graph-agents-cli 0.3.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (291) hide show
  1. graph_agents_cli/__init__.py +26 -0
  2. graph_agents_cli/_api_policy.py +2145 -0
  3. graph_agents_cli/_approvals.py +400 -0
  4. graph_agents_cli/_build.py +186 -0
  5. graph_agents_cli/_build_info.json +7 -0
  6. graph_agents_cli/_chat_client.py +462 -0
  7. graph_agents_cli/_click.py +157 -0
  8. graph_agents_cli/_defaults.py +139 -0
  9. graph_agents_cli/_experiments.py +64 -0
  10. graph_agents_cli/_http.py +192 -0
  11. graph_agents_cli/_output.py +83 -0
  12. graph_agents_cli/_project.py +462 -0
  13. graph_agents_cli/_remote.py +220 -0
  14. graph_agents_cli/_response_schema.py +264 -0
  15. graph_agents_cli/_runner.py +319 -0
  16. graph_agents_cli/_skills_check.py +274 -0
  17. graph_agents_cli/_tools.py +189 -0
  18. graph_agents_cli/_trust.py +66 -0
  19. graph_agents_cli/api/__init__.py +15 -0
  20. graph_agents_cli/api/_changes.py +506 -0
  21. graph_agents_cli/api/_files.py +658 -0
  22. graph_agents_cli/api/cmd_api.py +2480 -0
  23. graph_agents_cli/deploy/__init__.py +15 -0
  24. graph_agents_cli/deploy/_config.py +171 -0
  25. graph_agents_cli/deploy/_image.py +128 -0
  26. graph_agents_cli/deploy/_kube.py +286 -0
  27. graph_agents_cli/deploy/_modes.py +234 -0
  28. graph_agents_cli/deploy/_preflight.py +370 -0
  29. graph_agents_cli/deploy/_values.py +168 -0
  30. graph_agents_cli/deploy/cmd_deploy.py +1866 -0
  31. graph_agents_cli/deploy/gitops.py +562 -0
  32. graph_agents_cli/deploy/local_load.py +273 -0
  33. graph_agents_cli/dev/__init__.py +13 -0
  34. graph_agents_cli/dev/cmd_build.py +131 -0
  35. graph_agents_cli/dev/cmd_install.py +78 -0
  36. graph_agents_cli/dev/cmd_lint.py +119 -0
  37. graph_agents_cli/dev/cmd_playground.py +297 -0
  38. graph_agents_cli/dev/policy_check.py +1287 -0
  39. graph_agents_cli/eval/__init__.py +22 -0
  40. graph_agents_cli/eval/_client.py +670 -0
  41. graph_agents_cli/eval/_common.py +177 -0
  42. graph_agents_cli/eval/_judge.py +168 -0
  43. graph_agents_cli/eval/_judge_runner.py +238 -0
  44. graph_agents_cli/eval/_paths.py +212 -0
  45. graph_agents_cli/eval/checks.py +581 -0
  46. graph_agents_cli/eval/cmd_analyze.py +278 -0
  47. graph_agents_cli/eval/cmd_compare.py +284 -0
  48. graph_agents_cli/eval/cmd_eval_group.py +80 -0
  49. graph_agents_cli/eval/cmd_generate.py +558 -0
  50. graph_agents_cli/eval/cmd_grade.py +466 -0
  51. graph_agents_cli/eval/cmd_metric.py +156 -0
  52. graph_agents_cli/eval/cmd_run.py +370 -0
  53. graph_agents_cli/eval/cmd_submit.py +400 -0
  54. graph_agents_cli/eval/config.py +435 -0
  55. graph_agents_cli/eval/dataset.py +350 -0
  56. graph_agents_cli/eval/gate.py +420 -0
  57. graph_agents_cli/eval/transcript.py +192 -0
  58. graph_agents_cli/extension/__init__.py +13 -0
  59. graph_agents_cli/extension/_compat.py +86 -0
  60. graph_agents_cli/extension/_loader.py +293 -0
  61. graph_agents_cli/extension/_manifest.py +135 -0
  62. graph_agents_cli/extension/_overrides.py +195 -0
  63. graph_agents_cli/extension/_paths.py +91 -0
  64. graph_agents_cli/extension/_refs.py +193 -0
  65. graph_agents_cli/extension/_resolver.py +453 -0
  66. graph_agents_cli/extension/_schema.py +106 -0
  67. graph_agents_cli/extension/_spec.py +253 -0
  68. graph_agents_cli/extension/_sync.py +102 -0
  69. graph_agents_cli/extension/_trust.py +58 -0
  70. graph_agents_cli/extension/cmd_extension_add.py +259 -0
  71. graph_agents_cli/extension/cmd_extension_group.py +57 -0
  72. graph_agents_cli/extension/cmd_extension_list.py +56 -0
  73. graph_agents_cli/extension/cmd_extension_remove.py +61 -0
  74. graph_agents_cli/extension/cmd_extension_update.py +195 -0
  75. graph_agents_cli/info/__init__.py +13 -0
  76. graph_agents_cli/info/cmd_info.py +222 -0
  77. graph_agents_cli/infra/__init__.py +15 -0
  78. graph_agents_cli/infra/checks.py +1169 -0
  79. graph_agents_cli/infra/cmd_infra.py +103 -0
  80. graph_agents_cli/main.py +591 -0
  81. graph_agents_cli/peer/__init__.py +15 -0
  82. graph_agents_cli/peer/_generate.py +254 -0
  83. graph_agents_cli/peer/cmd_peer.py +1151 -0
  84. graph_agents_cli/run/__init__.py +13 -0
  85. graph_agents_cli/run/_local_server.py +1157 -0
  86. graph_agents_cli/run/_signals.py +141 -0
  87. graph_agents_cli/run/cmd_approvals.py +530 -0
  88. graph_agents_cli/run/cmd_run.py +1421 -0
  89. graph_agents_cli/scaffold/__init__.py +19 -0
  90. graph_agents_cli/scaffold/agents/README.md +24 -0
  91. graph_agents_cli/scaffold/agents/empty_py/.template/templateconfig.yaml +22 -0
  92. graph_agents_cli/scaffold/agents/langgraph/.env.example +292 -0
  93. graph_agents_cli/scaffold/agents/langgraph/.template/templateconfig.yaml +28 -0
  94. graph_agents_cli/scaffold/agents/langgraph/Dockerfile +59 -0
  95. graph_agents_cli/scaffold/agents/langgraph/Dockerfile.langgraph-server +59 -0
  96. graph_agents_cli/scaffold/agents/langgraph/README.md +571 -0
  97. graph_agents_cli/scaffold/agents/langgraph/api-policy.yaml +60 -0
  98. graph_agents_cli/scaffold/agents/langgraph/app/__init__.py +20 -0
  99. graph_agents_cli/scaffold/agents/langgraph/app/agent.py +174 -0
  100. graph_agents_cli/scaffold/agents/langgraph/app/app_utils/__init__.py +15 -0
  101. graph_agents_cli/scaffold/agents/langgraph/app/app_utils/a2a.py +2162 -0
  102. graph_agents_cli/scaffold/agents/langgraph/app/app_utils/a2a_client.py +1167 -0
  103. graph_agents_cli/scaffold/agents/langgraph/app/app_utils/api_client.py +4220 -0
  104. graph_agents_cli/scaffold/agents/langgraph/app/app_utils/approvals.py +1349 -0
  105. graph_agents_cli/scaffold/agents/langgraph/app/app_utils/auth.py +1986 -0
  106. graph_agents_cli/scaffold/agents/langgraph/app/app_utils/chat.py +2962 -0
  107. graph_agents_cli/scaffold/agents/langgraph/app/app_utils/checkpointer.py +432 -0
  108. graph_agents_cli/scaffold/agents/langgraph/app/app_utils/content.py +569 -0
  109. graph_agents_cli/scaffold/agents/langgraph/app/app_utils/db.py +580 -0
  110. graph_agents_cli/scaffold/agents/langgraph/app/app_utils/limits.py +203 -0
  111. graph_agents_cli/scaffold/agents/langgraph/app/app_utils/metrics.py +231 -0
  112. graph_agents_cli/scaffold/agents/langgraph/app/app_utils/middleware.py +361 -0
  113. graph_agents_cli/scaffold/agents/langgraph/app/app_utils/model.py +611 -0
  114. graph_agents_cli/scaffold/agents/langgraph/app/app_utils/playground.py +230 -0
  115. graph_agents_cli/scaffold/agents/langgraph/app/app_utils/run_locks.py +459 -0
  116. graph_agents_cli/scaffold/agents/langgraph/app/app_utils/structured.py +755 -0
  117. graph_agents_cli/scaffold/agents/langgraph/app/app_utils/telemetry.py +681 -0
  118. graph_agents_cli/scaffold/agents/langgraph/app/app_utils/threads.py +493 -0
  119. graph_agents_cli/scaffold/agents/langgraph/app/app_utils/token_exchange.py +959 -0
  120. graph_agents_cli/scaffold/agents/langgraph/app/fast_api_app.py +770 -0
  121. graph_agents_cli/scaffold/agents/langgraph/app/policies/__init__.py +55 -0
  122. graph_agents_cli/scaffold/agents/langgraph/app/policies/custom.py +97 -0
  123. graph_agents_cli/scaffold/agents/langgraph/app/tools/__init__.py +46 -0
  124. graph_agents_cli/scaffold/agents/langgraph/app/tools/example_api.py +92 -0
  125. graph_agents_cli/scaffold/agents/langgraph/app/tools/weather.py +33 -0
  126. graph_agents_cli/scaffold/agents/langgraph/langgraph.json +14 -0
  127. graph_agents_cli/scaffold/agents/langgraph/pyproject.toml +78 -0
  128. graph_agents_cli/scaffold/agents/langgraph/tests/conftest.py +376 -0
  129. graph_agents_cli/scaffold/agents/langgraph/tests/eval/datasets/basic-dataset.json +53 -0
  130. graph_agents_cli/scaffold/agents/langgraph/tests/eval/eval_config.yaml +32 -0
  131. graph_agents_cli/scaffold/agents/langgraph/tests/integration/approval_graph.py +137 -0
  132. graph_agents_cli/scaffold/agents/langgraph/tests/integration/fake_issuer.py +216 -0
  133. graph_agents_cli/scaffold/agents/langgraph/tests/integration/fake_openai.py +357 -0
  134. graph_agents_cli/scaffold/agents/langgraph/tests/integration/test_a2a_outcomes.py +569 -0
  135. graph_agents_cli/scaffold/agents/langgraph/tests/integration/test_a2a_relay.py +479 -0
  136. graph_agents_cli/scaffold/agents/langgraph/tests/integration/test_api_surface.py +812 -0
  137. graph_agents_cli/scaffold/agents/langgraph/tests/integration/test_approvals.py +1367 -0
  138. graph_agents_cli/scaffold/agents/langgraph/tests/integration/test_approvals_server.py +794 -0
  139. graph_agents_cli/scaffold/agents/langgraph/tests/integration/test_cross_actor.py +497 -0
  140. graph_agents_cli/scaffold/agents/langgraph/tests/integration/test_cross_actor_server.py +247 -0
  141. graph_agents_cli/scaffold/agents/langgraph/tests/integration/test_history_repair.py +278 -0
  142. graph_agents_cli/scaffold/agents/langgraph/tests/integration/test_model_apis.py +242 -0
  143. graph_agents_cli/scaffold/agents/langgraph/tests/integration/test_postgres.py +637 -0
  144. graph_agents_cli/scaffold/agents/langgraph/tests/integration/test_resilience_postgres.py +770 -0
  145. graph_agents_cli/scaffold/agents/langgraph/tests/integration/test_runtime_guardrails.py +854 -0
  146. graph_agents_cli/scaffold/agents/langgraph/tests/integration/test_server_e2e.py +340 -0
  147. graph_agents_cli/scaffold/agents/langgraph/tests/integration/test_server_runtime.py +989 -0
  148. graph_agents_cli/scaffold/agents/langgraph/tests/integration/test_structured_answers.py +584 -0
  149. graph_agents_cli/scaffold/agents/langgraph/tests/integration/test_structured_server.py +222 -0
  150. graph_agents_cli/scaffold/agents/langgraph/tests/integration/test_token_exchange_issuer.py +650 -0
  151. graph_agents_cli/scaffold/agents/langgraph/tests/load_test/.results/.placeholder +0 -0
  152. graph_agents_cli/scaffold/agents/langgraph/tests/load_test/README.md +22 -0
  153. graph_agents_cli/scaffold/agents/langgraph/tests/load_test/conftest.py +21 -0
  154. graph_agents_cli/scaffold/agents/langgraph/tests/load_test/load_test.py +81 -0
  155. graph_agents_cli/scaffold/agents/langgraph/tests/unit/test_a2a_client.py +824 -0
  156. graph_agents_cli/scaffold/agents/langgraph/tests/unit/test_a2a_scoping.py +724 -0
  157. graph_agents_cli/scaffold/agents/langgraph/tests/unit/test_api_client.py +1214 -0
  158. graph_agents_cli/scaffold/agents/langgraph/tests/unit/test_api_client_hardening.py +716 -0
  159. graph_agents_cli/scaffold/agents/langgraph/tests/unit/test_api_policy_rpc.py +767 -0
  160. graph_agents_cli/scaffold/agents/langgraph/tests/unit/test_approval_ledger.py +1536 -0
  161. graph_agents_cli/scaffold/agents/langgraph/tests/unit/test_fake_model.py +115 -0
  162. graph_agents_cli/scaffold/agents/langgraph/tests/unit/test_jwt_policy.py +991 -0
  163. graph_agents_cli/scaffold/agents/langgraph/tests/unit/test_limits.py +310 -0
  164. graph_agents_cli/scaffold/agents/langgraph/tests/unit/test_logging.py +148 -0
  165. graph_agents_cli/scaffold/agents/langgraph/tests/unit/test_logging_hardening.py +271 -0
  166. graph_agents_cli/scaffold/agents/langgraph/tests/unit/test_policy.py +378 -0
  167. graph_agents_cli/scaffold/agents/langgraph/tests/unit/test_resilience.py +610 -0
  168. graph_agents_cli/scaffold/agents/langgraph/tests/unit/test_server_auth.py +702 -0
  169. graph_agents_cli/scaffold/agents/langgraph/tests/unit/test_structured.py +673 -0
  170. graph_agents_cli/scaffold/agents/langgraph/tests/unit/test_telemetry.py +404 -0
  171. graph_agents_cli/scaffold/agents/langgraph/tests/unit/test_thread_listing.py +255 -0
  172. graph_agents_cli/scaffold/agents/langgraph/tests/unit/test_threads.py +268 -0
  173. graph_agents_cli/scaffold/agents/langgraph/tests/unit/test_token_exchange.py +1320 -0
  174. graph_agents_cli/scaffold/agents/langgraph/tests/unit/test_untrusted_content.py +393 -0
  175. graph_agents_cli/scaffold/agents/langgraph/uv-fastapi.lock +2084 -0
  176. graph_agents_cli/scaffold/agents/langgraph/uv-langgraph-server.lock +2106 -0
  177. graph_agents_cli/scaffold/agents/langgraph/{{cookiecutter.agent_guidance_filename}} +129 -0
  178. graph_agents_cli/scaffold/base_templates/_shared/graph-agents-cli-manifest.yaml +36 -0
  179. graph_agents_cli/scaffold/base_templates/python/.dockerignore +32 -0
  180. graph_agents_cli/scaffold/base_templates/python/.github/CODEOWNERS +30 -0
  181. graph_agents_cli/scaffold/base_templates/python/.github/agent.env +7 -0
  182. graph_agents_cli/scaffold/base_templates/python/.github/workflows/pr_checks.yaml +214 -0
  183. graph_agents_cli/scaffold/base_templates/python/.gitignore +209 -0
  184. graph_agents_cli/scaffold/base_templates/python/tests/unit/test_dummy.py +23 -0
  185. graph_agents_cli/scaffold/base_templates/python/{{cookiecutter.agent_guidance_filename}} +35 -0
  186. graph_agents_cli/scaffold/cmd_scaffold_group.py +49 -0
  187. graph_agents_cli/scaffold/commands/__init__.py +13 -0
  188. graph_agents_cli/scaffold/commands/create.py +1424 -0
  189. graph_agents_cli/scaffold/commands/enhance.py +1652 -0
  190. graph_agents_cli/scaffold/commands/upgrade.py +570 -0
  191. graph_agents_cli/scaffold/deployment_targets/kubernetes/python/.github/agent.env +12 -0
  192. graph_agents_cli/scaffold/deployment_targets/kubernetes/python/.github/workflows/promote-to-prod.yaml +371 -0
  193. graph_agents_cli/scaffold/deployment_targets/kubernetes/python/.github/workflows/staging.yaml +450 -0
  194. graph_agents_cli/scaffold/deployment_targets/kubernetes/python/deployment/argocd/application-dev.yaml +43 -0
  195. graph_agents_cli/scaffold/deployment_targets/kubernetes/python/deployment/argocd/application-prod.yaml +41 -0
  196. graph_agents_cli/scaffold/deployment_targets/kubernetes/python/deployment/argocd/application-staging.yaml +43 -0
  197. graph_agents_cli/scaffold/deployment_targets/kubernetes/python/deployment/helm/{{cookiecutter.project_name}}/.helmignore +14 -0
  198. graph_agents_cli/scaffold/deployment_targets/kubernetes/python/deployment/helm/{{cookiecutter.project_name}}/Chart.yaml +21 -0
  199. graph_agents_cli/scaffold/deployment_targets/kubernetes/python/deployment/helm/{{cookiecutter.project_name}}/examples/networkpolicy.yaml +103 -0
  200. graph_agents_cli/scaffold/deployment_targets/kubernetes/python/deployment/helm/{{cookiecutter.project_name}}/templates/NOTES.txt +48 -0
  201. graph_agents_cli/scaffold/deployment_targets/kubernetes/python/deployment/helm/{{cookiecutter.project_name}}/templates/_helpers.tpl +189 -0
  202. graph_agents_cli/scaffold/deployment_targets/kubernetes/python/deployment/helm/{{cookiecutter.project_name}}/templates/certificate.yaml +15 -0
  203. graph_agents_cli/scaffold/deployment_targets/kubernetes/python/deployment/helm/{{cookiecutter.project_name}}/templates/configmap.yaml +10 -0
  204. graph_agents_cli/scaffold/deployment_targets/kubernetes/python/deployment/helm/{{cookiecutter.project_name}}/templates/deployment.yaml +199 -0
  205. graph_agents_cli/scaffold/deployment_targets/kubernetes/python/deployment/helm/{{cookiecutter.project_name}}/templates/hpa.yaml +22 -0
  206. graph_agents_cli/scaffold/deployment_targets/kubernetes/python/deployment/helm/{{cookiecutter.project_name}}/templates/httproute.yaml +30 -0
  207. graph_agents_cli/scaffold/deployment_targets/kubernetes/python/deployment/helm/{{cookiecutter.project_name}}/templates/ingress.yaml +39 -0
  208. graph_agents_cli/scaffold/deployment_targets/kubernetes/python/deployment/helm/{{cookiecutter.project_name}}/templates/networkpolicy.yaml +48 -0
  209. graph_agents_cli/scaffold/deployment_targets/kubernetes/python/deployment/helm/{{cookiecutter.project_name}}/templates/pdb.yaml +13 -0
  210. graph_agents_cli/scaffold/deployment_targets/kubernetes/python/deployment/helm/{{cookiecutter.project_name}}/templates/postgresql-secret.yaml +37 -0
  211. graph_agents_cli/scaffold/deployment_targets/kubernetes/python/deployment/helm/{{cookiecutter.project_name}}/templates/service.yaml +15 -0
  212. graph_agents_cli/scaffold/deployment_targets/kubernetes/python/deployment/helm/{{cookiecutter.project_name}}/templates/serviceaccount.yaml +13 -0
  213. graph_agents_cli/scaffold/deployment_targets/kubernetes/python/deployment/helm/{{cookiecutter.project_name}}/templates/servicemonitor.yaml +42 -0
  214. graph_agents_cli/scaffold/deployment_targets/kubernetes/python/deployment/helm/{{cookiecutter.project_name}}/values-dev.yaml +22 -0
  215. graph_agents_cli/scaffold/deployment_targets/kubernetes/python/deployment/helm/{{cookiecutter.project_name}}/values-prod.yaml +45 -0
  216. graph_agents_cli/scaffold/deployment_targets/kubernetes/python/deployment/helm/{{cookiecutter.project_name}}/values-staging.yaml +29 -0
  217. graph_agents_cli/scaffold/deployment_targets/kubernetes/python/deployment/helm/{{cookiecutter.project_name}}/values.yaml +396 -0
  218. graph_agents_cli/scaffold/deployment_targets/kubernetes/python/tests/integration/test_chart.py +269 -0
  219. graph_agents_cli/scaffold/deployment_targets/none/README.md +5 -0
  220. graph_agents_cli/scaffold/deployment_targets/none/python/README.md +6 -0
  221. graph_agents_cli/scaffold/utils/__init__.py +13 -0
  222. graph_agents_cli/scaffold/utils/backup.py +212 -0
  223. graph_agents_cli/scaffold/utils/build_record.py +257 -0
  224. graph_agents_cli/scaffold/utils/cli_options.py +184 -0
  225. graph_agents_cli/scaffold/utils/fs.py +83 -0
  226. graph_agents_cli/scaffold/utils/generate_locks.py +214 -0
  227. graph_agents_cli/scaffold/utils/generation_metadata.py +88 -0
  228. graph_agents_cli/scaffold/utils/keyedit.py +768 -0
  229. graph_agents_cli/scaffold/utils/keymerge.py +537 -0
  230. graph_agents_cli/scaffold/utils/language.py +138 -0
  231. graph_agents_cli/scaffold/utils/lock_utils.py +94 -0
  232. graph_agents_cli/scaffold/utils/logging.py +77 -0
  233. graph_agents_cli/scaffold/utils/manifest.py +292 -0
  234. graph_agents_cli/scaffold/utils/merge.py +970 -0
  235. graph_agents_cli/scaffold/utils/merge3.py +216 -0
  236. graph_agents_cli/scaffold/utils/openapi_seed.py +199 -0
  237. graph_agents_cli/scaffold/utils/remote_template.py +376 -0
  238. graph_agents_cli/scaffold/utils/template.py +1352 -0
  239. graph_agents_cli/scaffold/utils/upgrade.py +894 -0
  240. graph_agents_cli/scaffold/utils/version.py +438 -0
  241. graph_agents_cli/secrets/__init__.py +15 -0
  242. graph_agents_cli/secrets/_apply.py +954 -0
  243. graph_agents_cli/secrets/_required.py +188 -0
  244. graph_agents_cli/secrets/cmd_secrets.py +211 -0
  245. graph_agents_cli/setup/__init__.py +13 -0
  246. graph_agents_cli/setup/_antigravity.py +221 -0
  247. graph_agents_cli/setup/cmd_auth.py +1030 -0
  248. graph_agents_cli/setup/cmd_dev_token.py +513 -0
  249. graph_agents_cli/setup/cmd_setup.py +428 -0
  250. graph_agents_cli/setup/cmd_update.py +140 -0
  251. graph_agents_cli/skills/__init__.py +13 -0
  252. graph_agents_cli/skills/_bundle.py +65 -0
  253. graph_agents_cli/skills/data/README.md +19 -0
  254. graph_agents_cli/skills/data/graph-agents-cli-deploy/SKILL.md +357 -0
  255. graph_agents_cli/skills/data/graph-agents-cli-deploy/references/github-settings.md +113 -0
  256. graph_agents_cli/skills/data/graph-agents-cli-deploy/references/gitops.md +137 -0
  257. graph_agents_cli/skills/data/graph-agents-cli-deploy/references/kubernetes.md +315 -0
  258. graph_agents_cli/skills/data/graph-agents-cli-deploy/references/secrets.md +160 -0
  259. graph_agents_cli/skills/data/graph-agents-cli-eval/SKILL.md +303 -0
  260. graph_agents_cli/skills/data/graph-agents-cli-eval/references/dataset_schema.md +282 -0
  261. graph_agents_cli/skills/data/graph-agents-cli-eval/references/metrics-guide.md +143 -0
  262. graph_agents_cli/skills/data/graph-agents-cli-langgraph-code/SKILL.md +659 -0
  263. graph_agents_cli/skills/data/graph-agents-cli-langgraph-code/references/langchain-models.md +124 -0
  264. graph_agents_cli/skills/data/graph-agents-cli-langgraph-code/references/langgraph.md +235 -0
  265. graph_agents_cli/skills/data/graph-agents-cli-langgraph-code/references/template-contract.md +477 -0
  266. graph_agents_cli/skills/data/graph-agents-cli-observability/SKILL.md +231 -0
  267. graph_agents_cli/skills/data/graph-agents-cli-observability/references/langsmith.md +46 -0
  268. graph_agents_cli/skills/data/graph-agents-cli-observability/references/otel.md +59 -0
  269. graph_agents_cli/skills/data/graph-agents-cli-scaffold/SKILL.md +414 -0
  270. graph_agents_cli/skills/data/graph-agents-cli-scaffold/references/flags.md +134 -0
  271. graph_agents_cli/skills/data/graph-agents-cli-workflow/SKILL.md +478 -0
  272. graph_agents_cli/skills/data/graph-agents-cli-workflow/references/brainstorming.md +118 -0
  273. graph_agents_cli/skills/data/graph-agents-cli-workflow/references/commands.md +419 -0
  274. graph_agents_cli/skills/data/graph-agents-cli-workflow/references/extension.md +156 -0
  275. graph_agents_cli/skills/data/graph-agents-cli-workflow/references/internals.md +67 -0
  276. graph_agents_cli/skills/data/graph-agents-cli-workflow/references/spec-template.md +56 -0
  277. graph_agents_cli/skills/data/graph-agents-cli-workflow/references/terminology.md +119 -0
  278. graph_agents_cli/system/__init__.py +15 -0
  279. graph_agents_cli/system/_apply.py +519 -0
  280. graph_agents_cli/system/_checks.py +1023 -0
  281. graph_agents_cli/system/_deploy.py +215 -0
  282. graph_agents_cli/system/_model.py +363 -0
  283. graph_agents_cli/system/_system.py +664 -0
  284. graph_agents_cli/system/_views.py +208 -0
  285. graph_agents_cli/system/cmd_system.py +423 -0
  286. graph_agents_cli-0.3.1.dist-info/METADATA +162 -0
  287. graph_agents_cli-0.3.1.dist-info/RECORD +291 -0
  288. graph_agents_cli-0.3.1.dist-info/WHEEL +4 -0
  289. graph_agents_cli-0.3.1.dist-info/entry_points.txt +2 -0
  290. graph_agents_cli-0.3.1.dist-info/licenses/LICENSE +201 -0
  291. graph_agents_cli-0.3.1.dist-info/licenses/NOTICE +19 -0
@@ -0,0 +1,414 @@
1
+ ---
2
+ name: graph-agents-cli-scaffold
3
+ description: >
4
+ This skill should be used when the user wants to "create an agent project",
5
+ "start a new LangGraph project", "build me a new agent", "scaffold a
6
+ project", "add Kubernetes deployment", "add CI/CD to my project", "add
7
+ Argo CD", "enhance my project", or "upgrade my project". Part of the
8
+ graph-agents-cli skills suite. Covers `graph-agents-cli create`,
9
+ `scaffold enhance`, and `scaffold upgrade` with every flag, the valid
10
+ runtime x checkpointer x target combinations, prototype semantics, the
11
+ registry default, the authentic-baseline rule for upgrade, and the files
12
+ upgrade never touches. Do NOT use for writing agent code
13
+ (graph-agents-cli-langgraph-code) or deployment operations
14
+ (graph-agents-cli-deploy).
15
+ metadata:
16
+ author: graph-agents-cli contributors
17
+ license: Apache-2.0
18
+ version: "0.3.1"
19
+ requires:
20
+ bins:
21
+ - graph-agents-cli
22
+ install: "uv tool install git+https://github.com/ss7172/graph-agents-cli@v0.3.1"
23
+ ---
24
+
25
+ # Project scaffolding guide
26
+
27
+ > **Requires:** `graph-agents-cli` (`uv tool install graph-agents-cli`, or the release tag: `uv tool install git+https://github.com/ss7172/graph-agents-cli@v0.3.1`).
28
+ > [Install uv](https://docs.astral.sh/uv/getting-started/installation/index.md) first if needed.
29
+
30
+ Use `graph-agents-cli create`, `scaffold enhance`, and `scaffold upgrade` to create a LangGraph
31
+ agent project, add deployment and CD to an existing one, or move a project to a newer template.
32
+
33
+ ---
34
+
35
+ ## Prerequisite: clarify requirements (MANDATORY for new projects)
36
+
37
+ **Before scaffolding, load `/graph-agents-cli-workflow` and complete Phase 0** (or the project's
38
+ declared process). Ask what the agent does, which external API operations it needs, which model
39
+ provider (and what may leave the network), and whether they want a prototype or Kubernetes.
40
+
41
+ ---
42
+
43
+ ## Step 1: choose the architecture
44
+
45
+ | Choice | Flag |
46
+ |---|---|
47
+ | Framework | `--agent langgraph` (default and only bundled template); `local@<path>` or `<org>/<repo>/<path>@<ref>` for a remote template |
48
+ | Runtime | `--runtime fastapi` (default) or `--runtime langgraph-server` |
49
+ | Model provider | `--model-provider openai\|anthropic\|gemini\|openai-compatible` (+ `--model <name>`) |
50
+ | Persistence | `--checkpointer memory\|postgres` (deployed default; local dev always starts with `CHECKPOINTER=memory` in `.env`) |
51
+ | Deployment | `--deployment-target kubernetes` (default) or `none`; `--prototype` |
52
+ | Registry | `--registry <url/org>` (default `ghcr.io/<org>`) |
53
+ | CD mode | `--cd argocd\|helm-push\|skip` (default `skip`) |
54
+ | Auth | `--auth-policy shared-bearer` (default), `jwt` (per-user OIDC/JWT tokens) or `custom` (your own policy; fail-closed stub) |
55
+ | Outbound API boundary | `--api-policy <file>` seeds `api-policy.yaml` (validated first); or none now and `graph-agents-cli api add` later. Access is always the user's explicit choice: never assume a level |
56
+ | Governing process | `--process <path>` writes `process:` to the manifest and the guidance file |
57
+ | Structured final answer | `--response-schema <file>` seeds `app/response_schema.json` (checked first, exit 3); `enhance` has no such flag: add the file by hand |
58
+
59
+ ### Valid runtime x checkpointer x target combinations (enforced by `create`)
60
+
61
+ | runtime | checkpointer | target | Valid | Notes |
62
+ |---|---|---|---|---|
63
+ | fastapi | memory | none | yes | local dev under uvicorn; state lost on restart |
64
+ | fastapi | memory | kubernetes | **no** | refused; multi-replica and restarts lose state |
65
+ | fastapi | postgres | none | yes | local dev against a local or docker Postgres |
66
+ | fastapi | postgres | kubernetes | yes | **default for kubernetes** |
67
+ | langgraph-server | memory | none | yes | `langgraph dev` in-memory server only; not deployable |
68
+ | langgraph-server | memory | kubernetes | **no** | refused |
69
+ | langgraph-server | postgres | kubernetes | yes | chart adds Redis; the server owns persistence |
70
+ | langgraph-server | postgres | none | yes | `run` and `playground` use `langgraph dev` (in-memory) locally; `postgres` is only the recorded deployed default |
71
+
72
+ Further validation: `--cd` other than `skip` requires `--deployment-target kubernetes`;
73
+ `--deployment-target none` defaults `--checkpointer memory`; `--auth-policy custom`
74
+ scaffolds the stub and writes `auth_policy_implemented: false` (deploy to staging/prod refuses
75
+ until the project flips it); an `--api-policy` with an `auth: forward` API is refused under
76
+ `--runtime langgraph-server` (the server would persist the forwarded credentials). The retired
77
+ `--product-policy` and `--auth-policy product-session` are refused with a rename hint.
78
+
79
+ ### Prototype semantics
80
+
81
+ `--prototype`: the deployment target defaults to `none` unless `--deployment-target` is given
82
+ explicitly (an explicit target wins), and `--cd` is forced to `skip`. No chart, no Argo
83
+ manifests, only `pr_checks.yaml` among the workflows. Add deployment later with `scaffold enhance`.
84
+
85
+ ### Registry default
86
+
87
+ `--registry` omitted: `ghcr.io/<org>`, where `<org>` under `-y` is the owner of the git `origin`
88
+ remote when present, else `ghcr.io/CHANGE-ME` with a warning. `build` and `deploy` refuse the
89
+ placeholder (exit 3) until `graph-agents-cli scaffold enhance --registry <host>/<org>` replaces
90
+ it in the manifest (`create_params.registry`, read by `build` and `deploy`), the chart values
91
+ (`image.repository`) and `.github/agent.env` (`IMAGE_REPOSITORY`); for a local cluster any
92
+ valid name works, since the image is side-loaded. Private registries (Harbor, `registry:2`)
93
+ are the same flag with a different URL. The image pull secret is an operator prerequisite
94
+ reported by `infra check`.
95
+
96
+ ### `langgraph-server` caveats
97
+
98
+ Needs Postgres and Redis in the cluster (the chart enables the Redis subchart in
99
+ `values-dev.yaml` for this runtime and sets `LANGGRAPH_SERVER=1`, `DATABASE_URI`, `REDIS_URI`)
100
+ and the `langchain/langgraph-api:0.14.4-py3.12` base image (its tag moves together with the
101
+ `langgraph-api` pin in `uv.lock`; the image build refuses a mismatch; mirror it into your registry
102
+ on disconnected networks). The server image disables LangGraph Server's unauthenticated meta
103
+ routes (`/docs`, `/openapi.json`, `/info`, `/metrics`). Licensing: the deployed image checks for a
104
+ LangGraph licence at startup (a LangSmith API key or a licence key, per LangChain's
105
+ documentation; add the variable to `secrets.keys`) and exits without one; the local
106
+ `langgraph dev` server (langgraph-cli[inmem]) needs none, so `run` and `playground` work
107
+ keyless. The runtime stays excluded from the disconnected profile. Thread ids must be UUIDs
108
+ under this runtime, and `DELETE /threads/{id}` is the server's own route. Under the in-memory
109
+ `langgraph dev` a one-off `run` advertises `--thread-id` resume, but the thread is gone once the
110
+ temporary server stops; use `--start-server` to keep it. Choose `fastapi` unless the team wants
111
+ the native Assistants/Threads/Runs API. No credential of the user reaches tools under this
112
+ runtime, so `create`, `lint` and `api add` refuse `auth: exchange` and `auth: forward`: it can
113
+ call other agents only with `auth: bearer`.
114
+
115
+ ---
116
+
117
+ ## Step 2: create, enhance, or upgrade
118
+
119
+ ### Create a new project
120
+
121
+ ```bash
122
+ graph-agents-cli create <project-name> \
123
+ --model-provider openai \
124
+ --runtime fastapi \
125
+ --deployment-target kubernetes --checkpointer postgres \
126
+ --registry ghcr.io/my-org --cd argocd \
127
+ --auth-policy shared-bearer \
128
+ -y
129
+ ```
130
+
131
+ **Constraints:**
132
+
133
+ - Project name: 26 characters or fewer, lowercase letters, numbers, hyphens. It is also the Helm
134
+ release name and the namespace prefix (`<name>-dev`, `<name>-staging`, `<name>-prod`).
135
+ - Do NOT `mkdir` the project directory first; `create` creates it (a pre-existing directory
136
+ triggers enhance semantics).
137
+ - `--agent-guidance-filename` defaults to `AGENTS.md` (read by Codex and most coding agents).
138
+ Pass `CLAUDE.md` (Claude Code) or `GEMINI.md` (Gemini CLI, Antigravity) only when the user says
139
+ the team uses that agent alone. The coding agent running `create` is not the team's choice, so
140
+ do not pick the file after yourself. When nobody names an agent, omit the flag and say in your
141
+ report that the guidance file stayed `AGENTS.md`.
142
+ - `create` copies the runtime's bundled lock (`uv-fastapi.lock` or `uv-langgraph-server.lock`)
143
+ to `uv.lock`; it installs nothing. Run `graph-agents-cli install` (`uv sync` from that lock)
144
+ before `run`, `eval` or the project's tests.
145
+ - Non-interactive by default: every parameter has a default (`--deployment-target kubernetes`,
146
+ `--agent langgraph`, `--runtime fastapi`, `--model-provider openai`, `--cd skip`, ...); `-y`
147
+ skips prompts; `-i` shows menus for a human at a terminal. An invalid combination is a
148
+ `UsageError` (exit 2) with the table's reason.
149
+ - `create` also renders `.github/agent.env` (read as data only by the workflows):
150
+ `GRAPH_AGENTS_CLI_SPEC`, the pinned source CI installs the CLI from
151
+ (`git+https://github.com/ss7172/graph-agents-cli@v<creating version>`, used as
152
+ `uvx --from "$GRAPH_AGENTS_CLI_SPEC" graph-agents-cli ...`), plus the chart settings for
153
+ kubernetes projects, and one `.github/CODEOWNERS` for every project. `pr_checks.yaml` runs the
154
+ tests on the fake model and the eval gate on the project's real provider when its key is a
155
+ repository secret (or the `MODEL_PROVIDER` / `MODEL_NAME` variables); without one the gate runs
156
+ on the fake model with a warning that it is not a quality signal.
157
+ - `create --api-policy <file>` validates the policy first (exit 3 on errors), copies the OpenAPI
158
+ specs it references into the project (a spec outside the policy's directory goes to
159
+ `openapi/<api>/<file>` and the reference is rewritten), adds every `auth: bearer` API's
160
+ `token_env` to `secrets.keys`, and renders `app/tools/example_api.py` with the first operation
161
+ the first API allows, whatever its method (a `body` argument for POST, PUT and PATCH; none,
162
+ with a note, when it allows nothing the example can make).
163
+ - `create` only seeds the policy. It evolves with the agent through `graph-agents-cli api`
164
+ (`add`, `access`, `allow`, `deny`, `revoke`, `limits`, `remove`, `show`, `check`), which keeps
165
+ the manifest (`api_policy`, `secrets.keys`), `.env.example` and the chart's `values.yaml` in
166
+ step; see `/graph-agents-cli-langgraph-code` for the schema.
167
+ - After `create`, the printed "Get Started" is `cp .env.example .env`,
168
+ `graph-agents-cli login --write-env`, `install`, `playground`, `eval run` (and `deploy --env
169
+ dev` for kubernetes): the local server answers 503 until `.env` has the provider key and, under
170
+ `shared-bearer`, an `API_KEY`. Under `jwt`, after `install`,
171
+ `export GRAPH_AGENTS_CLI_API_KEY="$(graph-agents-cli auth dev-token --sub <user>)"` gives local
172
+ runs a token (a dev key in `.env`, `APP_ENV=dev` only).
173
+ - After `create`, read `create_params` in `graph-agents-cli-manifest.yaml` and check every choice
174
+ the spec stated. Omit `--model` when the spec says "default model". `create` installs nothing
175
+ and creates no git repository, so run `install` or `git init` only when asked. In the report,
176
+ list the defaults you kept and any stub left to implement.
177
+
178
+ ### Enhance an existing project
179
+
180
+ ```bash
181
+ graph-agents-cli scaffold enhance . --deployment-target kubernetes --checkpointer postgres --registry ghcr.io/my-org
182
+ graph-agents-cli scaffold enhance . --cd argocd
183
+ graph-agents-cli scaffold enhance . --auth-policy custom
184
+ ```
185
+
186
+ Run from inside the project (the positional argument names a template to apply, not the project;
187
+ it is ignored when the manifest records one). Enhance renders the template for the new
188
+ parameters and applies the 3-way merge; a backup goes to
189
+ `~/.graph-agents-cli/backups/<dir>_<project id>_<timestamp>/` first (private, the newest 5 per
190
+ project kept). When the agent code is not in `app/`, pass `--agent-directory <dir>`.
191
+ `--api-policy` is refused by `enhance` (exit 2): change the policy with `graph-agents-cli api`
192
+ instead. When the merge changes
193
+ the manifest (for example `enhance --cd argocd`), `graph-agents-cli-manifest.yaml` is rewritten in
194
+ block style and its comments are dropped; app files stay byte-identical. **Always ask before
195
+ choosing the CD mode or auth policy.** A value the task states is the user's answer. When the user
196
+ cannot be asked, keep what `create_params` records (or the default on `create`) and report it.
197
+
198
+ Before enhancing, read `create_params` in `graph-agents-cli-manifest.yaml` so you pass only the
199
+ flags that change. Afterwards, confirm three things: the new `create_params` values; for a
200
+ kubernetes project, the registry in `.github/agent.env` (`IMAGE_REPOSITORY`) and in the chart's
201
+ `values.yaml` (`image.repository`); and that the agent code and eval data are listed under
202
+ "Skipping (your code and config)". Then run `graph-agents-cli lint`.
203
+
204
+ `--runtime` and `--model-provider` changes are reconciled everywhere they matter, so the result
205
+ matches a fresh `create` for the affected files: it prints "Recomputed for the new settings"
206
+ (runtime, provider, model, `secrets.keys` added and removed; keys you added are kept), updates
207
+ untouched `.env.example`, values files and Argo CD Applications, and merges the change into
208
+ edited ones (the chart's `values.yaml` and `.github/agent.env` key by key, keeping the keys you
209
+ changed and listing them). It ends with a numbered **Left for you** list. Items marked
210
+ `(required)` (a chart key still on the old runtime or model, an edited `Dockerfile`, whose new
211
+ version is written beside it as `Dockerfile.new`, dependency changes uv could not write) make
212
+ `enhance` exit 1: do them before building or deploying. A provider change keeps the model only
213
+ when it was the old provider's default; a model chosen for the old provider is refused (exit 2):
214
+ pass `--model` as well. After a runtime change run `graph-agents-cli install` to update
215
+ `uv.lock`. Exit codes: 0 applied, 1 required steps left, 2 usage error (or `uvx` missing for a
216
+ version-locked project), 3 configuration error.
217
+
218
+ ### Upgrade a project
219
+
220
+ ```bash
221
+ graph-agents-cli scaffold upgrade # current directory
222
+ graph-agents-cli scaffold upgrade <project-path>
223
+ graph-agents-cli scaffold upgrade --dry-run # preview
224
+ graph-agents-cli scaffold upgrade -y # apply non-conflicting changes (--auto-approve / --yes)
225
+ graph-agents-cli scaffold upgrade -i # resolve conflicts interactively
226
+ graph-agents-cli scaffold upgrade --baseline-ref <ref> --dry-run # name the build that created the project
227
+ graph-agents-cli scaffold upgrade --baseline current # explicit, logged opt-out of the authentic baseline
228
+ ```
229
+
230
+ **Authentic baseline or stop.** `upgrade` regenerates the old template with the exact CLI build
231
+ that created the project. The manifest names it: `cli_version` (a release, rebuilt with
232
+ `uvx --from git+https://github.com/ss7172/graph-agents-cli@v<old-version> graph-agents-cli scaffold create ...`,
233
+ or `GRAPH_AGENTS_CLI_INSTALL_SPEC` with `{version}` filled in) and `cli_build` (written by
234
+ `create`, `enhance` and `upgrade`: the build id `graph-agents-cli --version` prints, its commit,
235
+ and `template_digest`, a digest of what that build renders for the recorded settings). A build
236
+ between two releases (id `0.2.0+g<commit>`) is rebuilt from its commit in the repository. If the
237
+ build cannot be fetched and run (source unreachable, ref absent, `uvx` missing, or an
238
+ install-spec override without `{version}`, which would install some other build), `upgrade`
239
+ **stops with no changes** (exit 2 when `uvx` is missing or failed; exit 3 when the manifest's
240
+ `cli_version` is missing or not a release, the override lacks `{version}`, the recorded build
241
+ had uncommitted changes, or a build between releases is recorded while an override is set:
242
+ `{version}` names releases only), because an inauthentic baseline would misclassify files.
243
+ `--baseline current` compares against the current templates instead; it is an explicit opt-in,
244
+ logged, and the result is labelled as such. It cannot tell the user's edits from template
245
+ changes since the old version: every file listed under "Will preserve (differs from the current
246
+ template)" that the user did not edit keeps its old content, and dependency changes are not
247
+ merged. Do not pass it just to make the error go away; tell the user why the baseline is
248
+ unavailable.
249
+
250
+ **Same version, other build.** A project whose `cli_build` names another build of the running
251
+ version is upgraded from that build, unless both render the same files for its settings (same
252
+ `template_digest`: "already at version"). A manifest without `cli_build` (made before builds were
253
+ recorded, for example by a pre-release 0.2.0 build) is compared by version only: `upgrade` says
254
+ "already at version" and prints how to name the build. Name it with `--baseline-ref`, which
255
+ wins over the manifest: a commit or tag of the repository (`1a2b3c4`, `v0.1.0`),
256
+ `<clone>@<commit>` for a local clone (the commit is looked up there first), a path to a checkout
257
+ or wheel (rebuilt, never a stale uv cache), or a full install spec
258
+ (`git+https://<mirror>/graph-agents-cli@<commit>`). The baseline must render the manifest's
259
+ `cli_version` (exit 3 otherwise); a different recorded commit is a warning. Without a known
260
+ commit, `git -C <clone> log -1 --format=%H --before=<generated_at from the manifest>` gives a
261
+ first candidate (the newest commit before the project was generated); the build may be older
262
+ (a checkout behind its branch, or a stale uv build). Check it with `--dry-run`: with the right
263
+ build only files the user edited are listed under "Will preserve" or as conflicts; many
264
+ untouched scaffolding files there mean the wrong build (`upgrade` warns when most template files
265
+ would keep their current content, and when the baseline renders the same files as the running
266
+ build). After the upgrade the manifest records
267
+ the running build. Tags on the remote are the owner's to create; until `v<version>` exists there,
268
+ `--baseline-ref <clone>@<commit>` is the way to name any build.
269
+
270
+ A project created with 0.1.0 is upgraded against the `v0.1.0` tag (commit `fc3f2f9`). Never
271
+ use `--baseline current` for it: nearly every scaffolding file changed in 0.2.0, so the project
272
+ would keep 0.1.0's `app_utils`, chart and workflows, its tests would fail to import and `/chat`
273
+ would answer 500. If the tag cannot be fetched, name the commit in a clone that holds it:
274
+ `graph-agents-cli scaffold upgrade --baseline-ref <clone>@fc3f2f9`. Manual steps follow: see
275
+ the CHANGELOG's "Upgrading a project created with 0.1.0" (a new `app/policies/__init__.py` and
276
+ `app/agent.py`, `API_CALLS` instead of `PRODUCT_CALLS`, `secretOptional: true` in
277
+ `values-dev.yaml`). Outside a project `upgrade` exits 3.
278
+
279
+ **What upgrade never touches:**
280
+
281
+ - *agent code:* `app/agent.py`, `app/tools/**`, `app/policies/**`, `app/prompts/**`, `app/graph/**`,
282
+ `app/response_schema.json`
283
+ - *config:* `.env`, `.env.*`, `api-policy.yaml`, `deployment/helm/<name>/values-*.yaml`
284
+ (the environment values), `deployment/argocd/**`, `tests/eval/datasets/**`,
285
+ `tests/eval/eval_config.yaml`
286
+ - files the project added that exist in neither template snapshot
287
+
288
+ *Dependencies* (`pyproject.toml`, the manifest) are merged semantically. *Scaffolding* (everything
289
+ else: `values.yaml`, `templates/**`, `app/app_utils/**`, `app/fast_api_app.py`, the Dockerfile,
290
+ workflows) is 3-way compared and replaced only when the project has not modified it; modified
291
+ scaffolding produces a conflict to resolve.
292
+
293
+ ### Reference files
294
+
295
+ | File | Contents |
296
+ |---|---|
297
+ | `references/flags.md` | Full flag tables for `create`, `scaffold enhance`, `scaffold upgrade` |
298
+
299
+ ---
300
+
301
+ ## Step 3: load the dev workflow
302
+
303
+ After scaffolding, load `/graph-agents-cli-workflow` (lifecycle and rules) and
304
+ `/graph-agents-cli-langgraph-code` (what to edit: `app/agent.py`, `app/tools/`, `app/policies/`).
305
+
306
+ `.env` is yours. Preserve everything else the template generated; it wires serving, the auth
307
+ adapter, the checkpointer, the API client, telemetry, and A2A.
308
+
309
+ Verify: `graph-agents-cli run "test prompt"` for a smoke test, then `graph-agents-cli eval run`
310
+ for behaviour. Do not write pytest tests that assert on model output.
311
+
312
+ ---
313
+
314
+ ## Scaffold as reference
315
+
316
+ To inspect what the CLI generates without touching the current project, scaffold into a temporary
317
+ directory:
318
+
319
+ ```bash
320
+ graph-agents-cli create ref-project --output-dir /tmp --deployment-target kubernetes --cd argocd -y
321
+ ```
322
+
323
+ Copy the files you need (Dockerfile, chart, workflows), then delete the reference project.
324
+
325
+ ---
326
+
327
+ ## Critical rules
328
+
329
+ - **NEVER skip requirements clarification**; complete Phase 0 (or the declared process) first.
330
+ - **NEVER change the model** in an existing project unless asked; `--model` on `create` is the
331
+ only place you choose it, and only with the user's say-so.
332
+ - **NEVER `mkdir` before `create`.**
333
+ - **NEVER create a git repository or push without asking**; confirm name, visibility, and intent.
334
+ - **Always ask before choosing the CD mode**; `argocd` and `helm-push` need repository settings
335
+ the CLI cannot create (see the GitHub-settings reference in `/graph-agents-cli-deploy`).
336
+ - **Respect the combination table**; do not work around a refusal by editing the manifest.
337
+ - **`--process` when the project has a governing process**; it makes the workflow skill defer.
338
+ - **Start with `--prototype`** for quick iteration; add deployment later with `enhance`.
339
+ - **NEVER hand-write the A2A surface**; it is built into the scaffolded app. Nor A2A client code
340
+ or a delegating auth policy: `graph-agents-cli peer add` writes the policy entries and
341
+ `tools/a2a_peers.py` for each agent this one asks.
342
+ - **NEVER change `api-policy.yaml` on your own**; it is the project's reviewed security boundary.
343
+ When the user asks, use `graph-agents-cli api ...` with `--dry-run` first and show the diff;
344
+ ask which access (read-only, read-write, custom methods) rather than choosing one.
345
+
346
+ ---
347
+
348
+ ## Examples
349
+
350
+ **Prototype first**
351
+
352
+ > "Build me an agent that answers questions about our incidents."
353
+
354
+ 1. Phase 0: purpose, API operations and the access the user chooses for them (here
355
+ `listIncidents`, `getIncident` and `acknowledgeIncident`), provider.
356
+ 2. `graph-agents-cli create incident-helper --model-provider anthropic --prototype -y`
357
+ 3. `graph-agents-cli api add incidents --base-url-env INCIDENTS_API_BASE_URL --auth bearer --token-env INCIDENTS_API_TOKEN --access custom --methods GET,POST`,
358
+ then `api allow incidents listIncidents`, `api allow incidents getIncident`,
359
+ `api allow incidents acknowledgeIncident` (without a spec, add each one's
360
+ `--method M --path P` so the entry pins the endpoint, not only the label).
361
+ 4. Implement tools, smoke test, eval.
362
+ 5. Later: `graph-agents-cli scaffold enhance . --deployment-target kubernetes --checkpointer postgres --registry ghcr.io/acme --cd argocd`.
363
+
364
+ **Disconnected cluster**
365
+
366
+ > "Everything must stay on our network."
367
+
368
+ `graph-agents-cli create ops-agent --model-provider openai-compatible --model qwen2.5:14b --runtime fastapi --deployment-target kubernetes --registry harbor.internal/agents --cd skip -y`,
369
+ then set `OPENAI_BASE_URL` and `JUDGE_BASE_URL` in `.env`, `TRACING_ENABLED=false` or OTLP
370
+ in-cluster, and `GRAPH_AGENTS_CLI_NO_UPDATE_CHECK=1`.
371
+
372
+ **Project with its own process**
373
+
374
+ `graph-agents-cli create claims-agent --process docs/delivery-process.md ...` writes
375
+ `process: docs/delivery-process.md` to the manifest and the guidance file; the workflow skill
376
+ then follows that process's gates.
377
+
378
+ ---
379
+
380
+ ## Troubleshooting
381
+
382
+ | Symptom | Cause / fix |
383
+ |---|---|
384
+ | `create` refuses the combination | consult the table; pick `postgres` for kubernetes |
385
+ | `upgrade` exits 2: "Could not build the baseline" | the old CLI build could not be fetched (no `vX` tag on the remote, a commit that was never pushed, no network, no `uvx`); fix access, or name the build with `--baseline-ref <clone>@<commit>` (or point `GRAPH_AGENTS_CLI_INSTALL_SPEC`, with `{version}`, at a mirror that has the tag). `--baseline current` only knowingly, never for a 0.1.0 project |
386
+ | `upgrade` says "already at version X" for a project an earlier build of X created | its manifest records no `cli_build` (made before builds were recorded): name that build with `--baseline-ref` (the message shows the forms and how to find the commit) |
387
+ | `enhance` misplaces files | pass `--agent-directory` matching where the code lives |
388
+ | `ghcr.io/CHANGE-ME` in values | pass `--registry` or set a git `origin` remote before `create`; afterwards `graph-agents-cli scaffold enhance --registry <host>/<org>` sets it in the manifest, the chart values and `.github/agent.env`. `build` and `deploy` refuse the placeholder (exit 3) until then |
389
+ | `enhance` exits 1: "item(s) marked (required) above must be done by hand" | do each `(required)` step in the "Left for you" list (for example merge `Dockerfile.new` into your `Dockerfile`, or set the chart key it names) |
390
+ | `enhance` exits 2: "--model-provider X changes the provider, but the recorded model ..." | the model was chosen for the old provider: pass `--model <name>` for the new one |
391
+ | any command exits 3: "This project uses the retired product API policy" | follow the printed steps (rename to `api-policy.yaml`, `apis:` with `allowed_methods`, `API_CALLS`) |
392
+ | `create` exits 3: "GRAPH_AGENTS_CLI_INSTALL_SPEC contains ..." | the override has whitespace or a control character; fix or unset it |
393
+ | `graph-agents-cli` not found | `/graph-agents-cli-workflow` -> Setup |
394
+
395
+ ## Not covered by this skill
396
+
397
+ - Writing the graph, tools, policies: `/graph-agents-cli-langgraph-code`.
398
+ - `deploy`, `secrets`, `infra check`, GitHub settings: `/graph-agents-cli-deploy`.
399
+ - Eval datasets and the gate: `/graph-agents-cli-eval`.
400
+ - Tracing configuration: `/graph-agents-cli-observability`.
401
+ - Remote template authoring beyond the `--agent` spec forms.
402
+
403
+ ## Migration note
404
+
405
+ Compared with google-agents-cli: `--deployment-target agent_runtime|cloud_run|gke` became
406
+ `kubernetes|none`; `--session-type` became `--checkpointer`; `--cicd-runner` became `--cd`;
407
+ `--region`, `--bq-analytics`, `--agent-gateway`, the `adk@` shortcut, and the Terraform output are
408
+ gone; `--runtime`, `--model-provider`, `--model`, `--registry`, `--auth-policy`,
409
+ `--api-policy`, and `--process` are new.
410
+
411
+ ## Related skills
412
+
413
+ - `/graph-agents-cli-workflow`, `/graph-agents-cli-langgraph-code`, `/graph-agents-cli-eval`,
414
+ `/graph-agents-cli-deploy`, `/graph-agents-cli-observability`
@@ -0,0 +1,134 @@
1
+ # Command flag reference
2
+
3
+ Run `graph-agents-cli <command> --help` for the authoritative list.
4
+
5
+ ## `graph-agents-cli create <name>` (alias: `scaffold create`)
6
+
7
+ | Flag | Short | Default | Description |
8
+ |------|-------|---------|-------------|
9
+ | `--agent` | `-a` | `langgraph` | Agent template: `langgraph` (bundled), `local@<path>`, or `<org>/<repo>/<path>@<ref>` / a git URL for a remote template |
10
+ | `--runtime` | | `fastapi` | `fastapi` (uvicorn on `app.fast_api_app:app`) or `langgraph-server` (`langgraph-api` image; Postgres + Redis) |
11
+ | `--model-provider` | | `openai` (prompted with `-i`) | `openai`, `anthropic`, `gemini`, `openai-compatible` |
12
+ | `--model` | | provider default | Model name written to `.env` (`MODEL_NAME`) and the manifest |
13
+ | `--checkpointer` | | `postgres` for kubernetes, `memory` for `none` | Deployed default; validated against the combination table |
14
+ | `--deployment-target` | `-d` | `kubernetes` (`none` under `--prototype`) | `kubernetes` renders the Helm chart, environments, and workflows; `none` renders code only |
15
+ | `--registry` | | `ghcr.io/<org>` | Image registry and org; `<org>` from the git `origin` owner under `-y`, else `ghcr.io/CHANGE-ME` with a warning |
16
+ | `--cd` | | `skip` (forced under `--prototype`) | `argocd` (pull-based, Argo `Application`s, PR flow), `helm-push` (self-hosted runner runs `deploy --image`), `skip` (CI only) |
17
+ | `--auth-policy` | | `shared-bearer` | `shared-bearer` (API key), `jwt` (per-user OIDC/JWT tokens) or `custom` (stub; sets `auth_policy_implemented: false`); `product-session` is refused with a hint to `custom` |
18
+ | `--api-policy` | | none | Path to an `api-policy.yaml` to seed at the project root (validated with the strict schema first, exit 3 on errors); copies the OpenAPI specs it references; adds `api_policy.policy_file` to the manifest. Optional: without it the project has no policy until `graph-agents-cli api add`. `--product-policy` is refused with a rename hint |
19
+ | `--response-schema` | | none | Structured final answers: path to a JSON Schema (root `"type": "object"`) to seed as `<agent directory>/response_schema.json`, checked first against the subset the agent checks answers with (exit 3 on errors). The agent then answers in that JSON shape (`RESPONSE_FORMAT_STRATEGY` picks how). No manifest key: the file is the setting. `enhance` has no such flag: add the file by hand |
20
+ | `--process` | | none | Path to the governing process document; written as `process:` to the manifest and rendered into the guidance file |
21
+ | `--prototype` | `-p` | off | Target defaults to `none` unless given explicitly; `--cd` forced to `skip` |
22
+ | `--agent-directory` | `-dir` | `app` | Agent code directory inside the project |
23
+ | `--agent-guidance-filename` | | `AGENTS.md` | `AGENTS.md`, `CLAUDE.md`, or `GEMINI.md` |
24
+ | `--output-dir` | `-o` | `.` | Parent directory for the new project |
25
+ | `--base-template` | `-bt` | template default | Base template underneath a remote `--agent` template (remote templates only) |
26
+ | `--skip-checks` | `-s` | off | Skip the preflight check (only `uv` on PATH; the git-origin registry lookup still runs) |
27
+ | `--auto-approve` / `--yes` | `-y` | off | Non-interactive: defaults for anything not given |
28
+ | `--interactive` | `-i` | off | Menus and prompts for a human at a terminal |
29
+ | `--debug` | | off | Debug logging |
30
+
31
+ Project names must match `^[A-Za-z0-9][A-Za-z0-9_-]*$` (26 characters at most) and are
32
+ normalised to lowercase with hyphens (`My_Agent` -> `my-agent`), because the name becomes the Helm
33
+ release and the namespace prefix.
34
+
35
+ Validation (`create` refuses otherwise):
36
+
37
+ - runtime x checkpointer x target must be a valid row of the table in `SKILL.md`
38
+ (`memory` + `kubernetes` is refused for both runtimes);
39
+ - `--cd argocd|helm-push` requires `--deployment-target kubernetes`;
40
+ - `--deployment-target none` defaults `--checkpointer memory`;
41
+ - an `auth: forward` API in `--api-policy` is refused under `--runtime langgraph-server`;
42
+ - `GRAPH_AGENTS_CLI_INSTALL_SPEC`, when set, must be one install spec without control characters or
43
+ whitespace (exit 3 before anything is rendered).
44
+
45
+ What each choice renders:
46
+
47
+ | Choice | Files |
48
+ |---|---|
49
+ | (always) | `.github/workflows/pr_checks.yaml`, `.github/agent.env` (`GRAPH_AGENTS_CLI_SPEC`), `.github/CODEOWNERS`, `.env.example`, the guidance file |
50
+ | `--deployment-target kubernetes` | `deployment/helm/<name>/**`, `environments:` in the manifest, chart settings in `.github/agent.env`, `/deployment/` rules in CODEOWNERS |
51
+ | `--cd argocd` | + `deployment/argocd/application-{dev,staging,prod}.yaml`, `.github/workflows/{staging,promote-to-prod}.yaml` |
52
+ | `--cd helm-push` | + `.github/workflows/{staging,promote-to-prod}.yaml` |
53
+ | `--runtime langgraph-server` | server Dockerfile (`FROM langchain/langgraph-api:0.14.4-py3.12`, meta routes disabled), `langgraph.json` `http.app` + `auth`, Redis toggle in values, `uv-langgraph-server.lock` -> `uv.lock` |
54
+ | `--runtime fastapi` | multi-stage python Dockerfile with uvicorn (uid 1000, no uv in the final image), `uv-fastapi.lock` -> `uv.lock` |
55
+ | `--api-policy <file>` | `api-policy.yaml` at the root (copied into the image by the Dockerfile), `app/tools/example_api.py` (one call the first declared API allows, whatever its method: its first allowed operation, else one from its OpenAPI spec, else a generic operation of its first allowed method such as `GET /items/{item_id}` or `POST /items`; a `body` argument for POST, PUT and PATCH; left out, with a note, when that API allows nothing the example can make), `api_policy.policy_file` in the manifest, each `auth: bearer` API's `token_env` in `secrets.keys`, each API's `base_url_env` in `.env.example` and the chart values. `graph-agents-cli api add` makes the same changes for an API added later |
56
+ | `--response-schema <file>` | `app/response_schema.json` (the file, as given); `agent.py` of every project already builds the agent with `response_format()` |
57
+ | `--auth-policy custom` | `auth_policy_implemented: false` (the `app/policies/custom.py` stub ships in every project) |
58
+ | `--auth-policy jwt` | `AUTH_JWT_*` settings in `.env.example` and the chart values |
59
+
60
+ ## `graph-agents-cli scaffold enhance [TEMPLATE_PATH]`
61
+
62
+ `enhance` always enhances the current directory. `TEMPLATE_PATH` names the template to apply
63
+ (default: the current directory, re-rendering the recorded template); when the manifest records a
64
+ template it is re-applied and `TEMPLATE_PATH` is ignored.
65
+
66
+ | Flag | Short | Default | Description |
67
+ |------|-------|---------|-------------|
68
+ | `--name` | `-n` | the manifest's name (else the current directory name) | Project name for templating |
69
+ | `--deployment-target` | `-d` | manifest value | Add or change the target (`kubernetes`, `none`) |
70
+ | `--cd` | | manifest value | Add or change the CD mode (`argocd`, `helm-push`, `skip`) |
71
+ | `--runtime` | | manifest value | Change the runtime: the Dockerfile, `langgraph.json`, `secrets.keys`, `.env.example`, the chart values (key by key around your edits) and `.github/agent.env`; run `graph-agents-cli install` afterwards for `uv.lock` |
72
+ | `--checkpointer` | | manifest value | Change the deployed checkpointer default |
73
+ | `--registry` | | manifest value | Change the registry in values and workflows |
74
+ | `--auth-policy` | | manifest value | Switch between `shared-bearer`, `jwt` and `custom` |
75
+ | `--model-provider`, `--model` | | manifest value | Update the manifest, `secrets.keys`, `.env.example` and the chart values; the model follows the new provider's default only when it was the old default (otherwise pass `--model`, or exit 2); `.env` is never rewritten |
76
+ | `--process` | | manifest value | Declare or change the governing process |
77
+ | `--prototype` | `-p` | off | Same semantics as on `create` |
78
+ | `--agent-directory` | `-dir` | `app` | Where the agent code lives; pass it when not `app/` |
79
+ | `--agent-guidance-filename` | | the manifest's value | Guidance file to render |
80
+ | `--base-template` | `-bt` | | Base template underneath `TEMPLATE_PATH` (remote templates only) |
81
+ | `--force` | | off | Overwrite all scaffolding files (skips the 3-way compare; agent code and config still untouched); the same reconciliation runs afterwards, and a replay's exit code is kept |
82
+ | `--dry-run` / `--dryrun` | | off | Preview the merge without applying (requires saved metadata) |
83
+ | `--prefer-new` | | off | Resolve scaffolding conflicts in favour of the new template |
84
+ | `--skip-checks` | `-s` | off | Skip the `uv` preflight |
85
+ | `--auto-approve` / `--yes` | `-y` | off | Non-interactive |
86
+ | `--interactive` | `-i` | off | Prompts |
87
+ | `--debug` | | off | Debug logging |
88
+
89
+ `enhance` never touches `api-policy.yaml` (it refuses `--api-policy`, exit 2: change the policy
90
+ with `graph-agents-cli api`), `.env`, or agent code; files in those categories that
91
+ the project does not have yet but the new template does are added. Config files the new settings
92
+ re-render (`.env.example`, `values-*.yaml`, `deployment/argocd/**`) take the new render when
93
+ untouched and get the change merged in when edited; the chart's `values.yaml` and
94
+ `.github/agent.env` are merged key by key. When the merge changes the manifest (for example
95
+ `enhance --cd argocd` updating `cd:`), `graph-agents-cli-manifest.yaml` is rewritten through the
96
+ YAML dumper in block style and its comments are dropped.
97
+
98
+ Output: "Recomputed for the new settings", the files merged, and a numbered "Left for you" list.
99
+ Exit codes: `0` applied (anything left is optional), `1` applied with `(required)` steps left (a
100
+ chart key still on the old settings, `Dockerfile.new` beside an edited `Dockerfile`, dependency
101
+ changes uv could not write), `2` usage error, `3` configuration error (no project for
102
+ `--dry-run`, a legacy policy file). Backups: `~/.graph-agents-cli/backups/<dir>_<project
103
+ id>_<timestamp>` (0700; the newest 5 per project are kept).
104
+
105
+ ## `graph-agents-cli scaffold upgrade [<path>]`
106
+
107
+ | Flag | Short | Default | Description |
108
+ |------|-------|---------|-------------|
109
+ | `--dry-run` / `--dryrun` | | off | Show what would change |
110
+ | `--auto-approve` / `--yes` | `-y` | off | Apply non-conflicting changes without prompting |
111
+ | `--interactive` | `-i` | off | Resolve conflicts interactively |
112
+ | `--baseline authentic\|current` | | `authentic` | `authentic` runs the exact build that created the project through `uvx` and stops if it cannot; `current` compares against the current templates instead (explicit, logged, result labelled) |
113
+ | `--baseline-ref REF` | | none | The build that created the project, when the manifest cannot name it: a commit or tag of the repository, `<clone>@<commit>` for a local clone, a path to a checkout or wheel, or a full install spec. Also upgrades a project of the running version. Not with `--baseline current` |
114
+ | `--debug` | | off | Debug logging |
115
+
116
+ Behaviour: requires `uvx`; runs `uvx --from <spec> graph-agents-cli scaffold create` to
117
+ regenerate the old baseline. The spec is `--baseline-ref`'s; else, for a manifest whose
118
+ `cli_build` names a build between releases (id `X.Y.Z+g<commit>`), that commit
119
+ (`git+https://github.com/ss7172/graph-agents-cli@<commit>`); else the `cli_version` release
120
+ (`git+https://github.com/ss7172/graph-agents-cli@v<version>`, or
121
+ `GRAPH_AGENTS_CLI_INSTALL_SPEC` with `{version}` filled in; `{version}` names releases only).
122
+ A local path is rebuilt (`uvx --refresh-package graph-agents-cli`). At the running version,
123
+ a project is "already at version" when `cli_build` names this build or one with the same
124
+ `template_digest`, and a manifest without `cli_build` is compared by version only (the message
125
+ says how to name its build with `--baseline-ref`). Stops with no changes when the baseline
126
+ fails (exit 2: `uvx` missing or the fetch failed; exit 3: `cli_version` missing or not a
127
+ release, an override without `{version}`, a recorded build with uncommitted changes, a build
128
+ between releases recorded while an override is set, a `--baseline-ref` that names no build, or
129
+ a baseline that renders another `cli_version`), unless `--baseline current`, which cannot tell
130
+ your edits from template changes since the old version (unedited files it preserves keep
131
+ their old content; dependency changes are not merged). Backup first to
132
+ `~/.graph-agents-cli/backups/`. Updates `cli_version` (when it changes) and `cli_build` in the
133
+ manifest on success. Outside a project: exit 3. A project still on the retired
134
+ `product-policy.yaml` stops with migration steps (exit 3).