rainskills 0.1.0 → 0.1.2

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 (116) hide show
  1. package/README.md +156 -420
  2. package/SKILL.md +37 -7
  3. package/agents/openai.yaml +2 -2
  4. package/bin/rainskills-tools.js +712 -0
  5. package/bin/rainskills.js +1109 -4
  6. package/install.sh +536 -63
  7. package/marketplace/rainskills/.claude-plugin/plugin.json +2 -2
  8. package/marketplace/rainskills/.codex-plugin/plugin.json +5 -5
  9. package/marketplace/rainskills/skills/rainskills/SKILL.md +38 -8
  10. package/package.json +14 -5
  11. package/pi/rainskills-mcp.ts +214 -1850
  12. package/rainbond-app-assistant/SKILL.md +123 -49
  13. package/rainbond-app-assistant/evals/01-linked-topology-missing.response.md +3 -3
  14. package/rainbond-app-assistant/evals/02-linked-topology-building.response.md +3 -3
  15. package/rainbond-app-assistant/evals/03-runtime-healthy-delivery-unknown.response.md +3 -3
  16. package/rainbond-app-assistant/evals/04-delivered-stop-without-promotion.expected.yaml +1 -1
  17. package/rainbond-app-assistant/evals/04-delivered-stop-without-promotion.response.md +1 -1
  18. package/rainbond-app-assistant/evals/05-delivered-explicit-dev-to-test.response.md +3 -3
  19. package/rainbond-app-assistant/evals/06-manual-validation-stop.expected.yaml +1 -1
  20. package/rainbond-app-assistant/evals/06-manual-validation-stop.response.md +3 -3
  21. package/rainbond-app-assistant/evals/07-cluster-capacity-blocked.response.md +4 -4
  22. package/rainbond-app-assistant/evals/08-code-build-handoff-stop.response.md +2 -2
  23. package/rainbond-app-assistant/evals/09-source-backed-failure-no-fallback.response.md +2 -2
  24. package/rainbond-app-assistant/evals/10-identity-ambiguous-stop.response.md +3 -3
  25. package/rainbond-app-assistant/evals/12-complex-suite-needs-descriptor-stop.response.md +2 -2
  26. package/rainbond-app-assistant/evals/13-explicit-git-url-locks-source.response.md +2 -2
  27. package/rainbond-app-assistant/evals/14-strategy-switch-cleans-residue.response.md +2 -2
  28. package/rainbond-app-assistant/evals/15-turn-discipline-reuse-alias.response.md +2 -2
  29. package/rainbond-app-assistant/references/operational-reference.md +77 -0
  30. package/rainbond-app-assistant/references/output-contract.md +454 -0
  31. package/rainbond-app-assistant/references/product-object-model.md +1558 -0
  32. package/rainbond-app-assistant/references/workflow-rules.md +343 -0
  33. package/rainbond-app-assistant/schemas/app-assistant-result.schema.yaml +6 -1
  34. package/rainbond-app-version-assistant/SKILL.md +57 -18
  35. package/rainbond-delivery-verifier/SKILL.md +86 -13
  36. package/rainbond-env-sync/SKILL.md +52 -11
  37. package/rainbond-fullstack-bootstrap/SKILL.md +79 -11
  38. package/rainbond-fullstack-bootstrap/evals/01-reuse-only.response.md +1 -1
  39. package/rainbond-fullstack-bootstrap/evals/02-deferred-dependency.response.md +1 -1
  40. package/rainbond-fullstack-bootstrap/evals/03-capacity-blocked.response.md +1 -1
  41. package/rainbond-fullstack-bootstrap/evals/04-template-skip.response.md +1 -1
  42. package/rainbond-fullstack-bootstrap/evals/05-source-ambiguity-stop.response.md +1 -1
  43. package/rainbond-fullstack-bootstrap/evals/06-external-artifact-unreachable.response.md +1 -1
  44. package/rainbond-fullstack-bootstrap/evals/07-provider-connection-contract.response.md +1 -1
  45. package/rainbond-fullstack-bootstrap/evals/08-explicit-dependency-after-manual-components.response.md +1 -1
  46. package/rainbond-fullstack-bootstrap/evals/09-inferred-provider-consumer-gate.response.md +1 -1
  47. package/rainbond-fullstack-bootstrap/evals/10-compose-service-name-not-hostname.response.md +1 -1
  48. package/rainbond-fullstack-bootstrap/evals/11-reverse-proxy-not-dropped.response.md +1 -1
  49. package/rainbond-fullstack-bootstrap/evals/12-optional-services-disclose-not-deploy.response.md +1 -1
  50. package/rainbond-fullstack-bootstrap/evals/13-env-reference-dependency-completeness.response.md +1 -1
  51. package/rainbond-fullstack-bootstrap/evals/14-client-package-upload.expected.yaml +1 -1
  52. package/rainbond-fullstack-bootstrap/evals/14-client-package-upload.response.md +3 -3
  53. package/rainbond-fullstack-bootstrap/evals/15-unfinished-dockerfile-recovery.expected.yaml +25 -0
  54. package/rainbond-fullstack-bootstrap/evals/15-unfinished-dockerfile-recovery.response.md +44 -0
  55. package/rainbond-fullstack-bootstrap/evals/16-complete-cnb-recreate-confirmed.expected.yaml +25 -0
  56. package/rainbond-fullstack-bootstrap/evals/16-complete-cnb-recreate-confirmed.response.md +44 -0
  57. package/rainbond-fullstack-bootstrap/modules/10-context-loading.md +8 -8
  58. package/rainbond-fullstack-bootstrap/modules/30-creation-rules.md +10 -10
  59. package/rainbond-fullstack-bootstrap/modules/40-source-and-package-rules.md +13 -9
  60. package/rainbond-fullstack-bootstrap/modules/50-workflow-and-convergence.md +6 -6
  61. package/rainbond-fullstack-bootstrap/modules/60-verification-and-handoffs.md +4 -4
  62. package/rainbond-fullstack-bootstrap/modules/70-output-contract.md +3 -3
  63. package/rainbond-fullstack-bootstrap/references/quick-reference.md +6 -6
  64. package/rainbond-fullstack-bootstrap/references/source-build-parameter-guide.md +6 -6
  65. package/rainbond-fullstack-bootstrap/references/sql-init-recipe.md +3 -3
  66. package/rainbond-fullstack-bootstrap/schemas/bootstrap-result.schema.yaml +3 -2
  67. package/rainbond-fullstack-bootstrap/scripts/upload_local_package.py +1 -1
  68. package/rainbond-fullstack-bootstrap/scripts/validate_bootstrap_output.py +2 -2
  69. package/rainbond-fullstack-troubleshooter/SKILL.md +103 -13
  70. package/rainbond-fullstack-troubleshooter/evals/10-config-file-configmap-missing.expected.yaml +21 -0
  71. package/rainbond-fullstack-troubleshooter/evals/10-config-file-configmap-missing.response.md +51 -0
  72. package/rainbond-fullstack-troubleshooter/references/operational-reference.md +70 -0
  73. package/rainbond-fullstack-troubleshooter/references/output-contract.md +259 -0
  74. package/rainbond-fullstack-troubleshooter/references/root-cause-rules.md +210 -0
  75. package/rainbond-fullstack-troubleshooter/schemas/troubleshoot-result.schema.yaml +3 -1
  76. package/rainbond-fullstack-troubleshooter/scripts/validate_troubleshoot_output.py +22 -1
  77. package/rainbond-platform-installer/SKILL.md +73 -9
  78. package/rainbond-platform-installer/agents/openai.yaml +2 -2
  79. package/rainbond-platform-installer/references/installation-policy.json +35 -1
  80. package/rainbond-platform-installer/references/installation-policy.md +33 -8
  81. package/rainbond-platform-installer/references/troubleshooting.md +3 -2
  82. package/rainbond-platform-installer/scripts/auto-update.js +495 -0
  83. package/rainbond-platform-installer/scripts/console-origin.js +159 -0
  84. package/rainbond-platform-installer/scripts/environment-credentials.js +225 -0
  85. package/rainbond-platform-installer/scripts/environment-registry.js +349 -0
  86. package/rainbond-platform-installer/scripts/existing-kubernetes-installer.js +1370 -0
  87. package/rainbond-platform-installer/scripts/host-cluster-installer.js +2143 -0
  88. package/rainbond-platform-installer/scripts/local-runtime-commands.js +180 -0
  89. package/rainbond-platform-installer/scripts/local-runtime.js +18 -0
  90. package/rainbond-platform-installer/scripts/mcp-router.js +212 -0
  91. package/rainbond-platform-installer/scripts/mcp-server.js +79 -0
  92. package/rainbond-platform-installer/scripts/platform-installer.js +694 -255
  93. package/rainbond-platform-installer/scripts/platform-routing.js +326 -0
  94. package/rainbond-platform-installer/scripts/runtime-credentials.js +163 -0
  95. package/rainbond-platform-installer/scripts/runtime-intents.js +251 -0
  96. package/rainbond-platform-installer/scripts/runtime-operations.js +383 -0
  97. package/rainbond-platform-installer/scripts/runtime-state.js +656 -0
  98. package/rainbond-platform-installer/scripts/secure-state.js +59 -13
  99. package/rainbond-platform-installer/scripts/ssh-key-setup.js +242 -0
  100. package/rainbond-platform-installer/scripts/telemetry.js +244 -0
  101. package/rainbond-platform-installer/scripts/user-message.js +125 -0
  102. package/rainbond-platform-installer/scripts/windows-auth.js +1 -1
  103. package/rainbond-platform-installer/scripts/windows-client-config.js +101 -22
  104. package/rainbond-platform-installer/scripts/windows-onboarding.js +179 -83
  105. package/rainbond-platform-installer/scripts/windows-platform.js +3 -3
  106. package/rainbond-platform-installer/scripts/windows-platform.ps1 +264 -28
  107. package/rainbond-platform-installer/scripts/windows-read-user-environment.ps1 +16 -0
  108. package/rainbond-platform-query/SKILL.md +88 -0
  109. package/rainbond-platform-query/agents/openai.yaml +4 -0
  110. package/rainbond-platform-query/evals/01-current-enterprise.expected.yaml +10 -0
  111. package/rainbond-project-init/SKILL.md +68 -9
  112. package/rainbond-project-init/references/manifest-rules.md +487 -0
  113. package/rainbond-project-init/references/operational-reference.md +74 -0
  114. package/rainbond-project-init/references/output-contract.md +272 -0
  115. package/rainbond-project-init/references/workflow-and-verification.md +85 -0
  116. package/rainbond-template-installer/SKILL.md +80 -16
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: rainbond-app-assistant
3
- description: "Use for any request to deploy, run, deliver, publish, or troubleshoot the current project — regardless of whether the user mentions \"Rainbond\" by name. Triggers on generic intents such as: 帮我把项目跑起来 / 部署这个项目 / 发布上线 / 看看为什么跑不起来 / 帮我交付 / 排查一下 / deploy this project / run this app / check what is blocking it. Prefer this skill when a Rainbond MCP connection is configured in the session. Handles the full lifecycle: project-init, bootstrap, troubleshooting, delivery verification, dev-to-test promotion, and code-layer handoff."
3
+ description: "Use whenever a user asks to deploy, run, deliver, publish, inspect, repair, or troubleshoot the current project, regardless of whether a runtime or MCP connection is configured and whether Rainbond is named. Trigger phrases include: 帮我把当前项目部署到 Rainbond 上 / 帮我把这个项目跑起来 / 帮我看看当前项目卡在哪 / 如果还没初始化就先初始化,然后自动继续到应该停止的位置 / 帮我处理一下这个应用 / deploy this project / run this app / publish this app / troubleshoot this project."
4
4
  ---
5
5
 
6
6
  # Rainbond App Assistant
@@ -55,65 +55,134 @@ description: "Use for any request to deploy, run, deliver, publish, or troublesh
55
55
  - 规则说明、流程说明、人类可读结论:优先中文
56
56
  - `### Structured Output` 里的对象名、字段名、enum:保持英文 canonical 形式
57
57
 
58
- ## Preflight Gate(最高优先级,先于硬规则执行)
58
+ <!-- rainskills-user-result:start -->
59
+ ## 用户可见结果协议(最高优先级)
59
60
 
60
- 在读取其它 skill 文件、扫描用户项目、或调用任何业务 MCP 工具之前,必须先验证当前会话能力。
61
+ 普通用户请求部署、排障或交付验证时,内部可以维护结构化结果,但最终用户回复必须简短、中文、只呈现用户能直接使用的信息。若本节与后文 Output Format、示例或评测格式冲突,以本节为准。
61
62
 
62
- Step 0 — Probe MCP availability:
63
- - 调用一个轻量探针,例如 `rainbond_query_enterprises`
64
- - 成功:记录 enterprise / team / region 上下文,进入"硬规则"和主线流程
65
- - 失败(auth / transport / timeout / not configured):立即停止,不进入业务流程
63
+ 部署成功时按下面的内容输出;所有名称和地址必须来自本轮真实返回值。某项无法确认时省略该项,不得猜测或推测:
66
64
 
67
- Preflight 失败时禁止做的事:
68
- - 读取其它 reference / SKILL 文件
69
- - 扫描用户项目目录、读取 `rainbond.app.json` 或 `.rainbond/local.json`
70
- - 在本地生成 `Dockerfile`、`docker-compose.yml`、`manifest`、部署脚本或临时部署文档
71
- - 手工编写或猜测 `~/.rainbond/mcp.env`、JWT、API token
72
- - 调用任何业务 MCP 工具
65
+ ```text
66
+ 部署成功。
73
67
 
74
- Preflight 失败时必须给用户的动作建议,需要先区分场景:
68
+ - 项目:<用户项目名称>
69
+ - 运行环境:<本次实际使用的运行环境名称>
70
+ - 工作空间:<本次实际部署到的 Rainbond 工作空间名称>
71
+ - 应用:<创建或使用的 Rainbond 应用名称>
72
+ - 运行环境地址:<Rainbond Console 或应用管理页面地址>
73
+ - 应用访问地址:<部署完成后真实可访问的应用地址>
74
+ - 已完成操作:<用一句话概括本轮实际完成的项目识别、应用创建、组件构建、启动和访问验证;只列真实执行过的操作>
75
+ ```
75
76
 
76
- - 如果用户机器上已存在 `~/.rainbond/mcp.env` 或 `~/.rainbond/skills/install.sh`,
77
- 判定为「已装过,多半是 JWT 过期 / 401 / 403」,给出 refresh 指引:
77
+ 部署失败或未完成时只输出:
78
78
 
79
- ```bash
80
- bash <(curl -fsSL https://get.rainbond.com/rainskills/install.sh) refresh
81
- # 或:bash ~/.rainbond/skills/install.sh refresh
82
- ```
79
+ ```text
80
+ 部署失败。
83
81
 
84
- 成功后按安装器输出执行客户端恢复动作:Codex / Claude Code 重启,Pi Agent 执行
85
- `/reload`;OpenClaw 当前 CLI 使用安装器触发 MCP 热加载,独立 Gateway / Agent 进程需重新加载配置或重启。恢复完成后再让用户重新触发同一指令,
86
- 本轮不要自动重试同一个 MCP 工具调用。
82
+ 失败原因:<用用户能理解的一句话说明直接原因>
87
83
 
88
- - 否则视为首次安装,给完整安装命令:
84
+ 解决办法:<确实存在安全、可执行的解决方案时才输出;没有就省略整项>
85
+ ```
89
86
 
90
- ```bash
91
- bash <(curl -fsSL https://get.rainbond.com/rainskills/install.sh)
92
- ```
87
+ 只有“解决办法”确实存在并且可执行时才输出该项。默认用户回复不得出现 `Problem Judgment`、`Actions Taken`、`Verification Result`、`Follow-up Advice`、`Structured Output` 等诊断标题;不得展示内部状态码、枚举、对象字段、YAML、JSON、工具调用记录或英文状态表。只有用户明确要求结构化结果,或者自动化/评测明确要求结构化契约时,才允许输出后文的结构化格式。
88
+ <!-- rainskills-user-result:end -->
89
+
90
+ <!-- rainskills-runtime-gate:start -->
91
+ ## 运行环境门禁(最高优先级)
92
+
93
+ ### 多运行环境操作契约
94
+
95
+ Node.js 前置检查通过后,每次用户业务请求都创建独立操作,不把项目绑定到任何环境、团队或应用。先执行本地 launcher + `["environment", "list", "--json"]`:用户明确说“运行环境/平台”时按环境名选择;明确说“团队”时表示默认环境中的团队;裸名称同时匹配环境和团队时必须让用户确认。未指定环境时使用全局默认环境;默认环境不可用时停止,禁止自动切换到其他环境。
96
+
97
+ 生成新的 UUID,并执行本地 launcher + `["operation", "begin", "--operation-id", "<uuid>", "--intent-json", "<intent-json>"]`;用户明确指定已有环境时在 `--intent-json` 前加入 `["--environment-id", "<immutable-environment-id>"]`。保存返回的 `operation_id`,此后每个 Rainbond MCP 工具调用都必须在参数中加入 `rainskills_operation_id`。环境改名或修改全局默认值不能改变已开始操作的目标。同一项目可以在多个环境和团队分别部署,禁止写入或推断项目级默认环境。
98
+
99
+ 第一步检查 Node.js 是否存在且主版本不低于 18。Node.js 缺失或低于 18 时,只说明“Rainskills 执行组件需要 Node.js 18 或更高版本”并停止:不选择运行环境,不调用 MCP,不猜测替代命令。只有用户或 agent 明确同意后才安装或升级 Node.js,再从同一原始 intent 继续。
100
+
101
+ 固定 launcher 是 `["npx", "--yes", "rainskills@0.1.2"]`;版本必须与本技能包 `package.json` 一致。把 launcher 与参数拼成 argv 数组直接执行,禁止使用 `rainskills@latest`,禁止拼接或执行 shell 字符串。
102
+
103
+ 本地 launcher 必须从当前 Skill 所在目录的同级目录定位 `rainbond-platform-installer/scripts/local-runtime.js`,解析为绝对路径后使用 `["node", "<绝对路径>"]` 执行。`environment list`、`operation begin`、`operation complete` 和 `runtime message` 只能使用本地 launcher;本地 launcher 只读取已安装文件和本机受保护状态,不得访问 npm 或其它网络。只有用户选定连接或安装运行环境后,才使用上面的固定 npx launcher。
104
+
105
+ <!-- rainskills-runtime-contract:start -->
106
+ ```json
107
+ {
108
+ "schema": "rainskills.skill-runtime-contract.v1",
109
+ "launcher": ["npx", "--yes", "rainskills@0.1.2"],
110
+ "local_launcher": ["node", "<installed-skills-root>/rainbond-platform-installer/scripts/local-runtime.js"],
111
+ "local_argv": {
112
+ "environment-list": ["node", "<installed-skills-root>/rainbond-platform-installer/scripts/local-runtime.js", "environment", "list", "--json"],
113
+ "operation-begin": ["node", "<installed-skills-root>/rainbond-platform-installer/scripts/local-runtime.js", "operation", "begin", "--operation-id", "<uuid>", "--intent-json", "<intent-json>"],
114
+ "operation-complete": ["node", "<installed-skills-root>/rainbond-platform-installer/scripts/local-runtime.js", "operation", "complete", "--operation-id", "<uuid>"],
115
+ "runtime-message": ["node", "<installed-skills-root>/rainbond-platform-installer/scripts/local-runtime.js", "runtime", "message", "--id", "<message-id>"]
116
+ },
117
+ "intents": {
118
+ "deploy": {"required": [], "optional": ["project_root", "source_kind", "source_url", "service_id"], "enums": {"source_kind": ["local", "git", "image", "package"]}},
119
+ "create": {"required": [], "optional": ["project_root", "source_kind", "source_url", "service_id"], "enums": {"source_kind": ["local", "git", "image", "package"]}},
120
+ "query": {"required": ["operation"], "optional": ["team_id", "app_id", "service_id"], "enums": {"operation": ["summary", "components", "events", "logs", "access"]}},
121
+ "troubleshoot": {"required": ["operation"], "optional": ["team_id", "app_id", "service_id"], "enums": {"operation": ["auto", "build", "runtime", "access"]}},
122
+ "modify": {"required": ["team_id", "app_id", "operation"], "optional": ["service_id"], "enums": {"operation": ["component-config", "build-source", "ports", "env", "storage", "dependency"]}}
123
+ },
124
+ "routes": {
125
+ "new": ["saas", "private-existing", "install-private"],
126
+ "existing": ["saas", "private-existing"]
127
+ },
128
+ "connect_argv": {
129
+ "saas": ["npx", "--yes", "rainskills@0.1.2", "runtime", "connect", "<target>", "--saas", "--intent-json", "<intent-json>"],
130
+ "private-existing": ["npx", "--yes", "rainskills@0.1.2", "runtime", "connect", "<target>", "--rainbond-url", "<rainbond-url>", "--intent-json", "<intent-json>"],
131
+ "install-private": ["npx", "--yes", "rainskills@0.1.2", "runtime", "connect", "<target>", "--install-private", "--location", "<private-location>", "--intent-json", "<intent-json>"]
132
+ }
133
+ }
134
+ ```
135
+ <!-- rainskills-runtime-contract:end -->
93
136
 
94
- 安装脚本会配置 MCP server、保存 JWT,并验证当前客户端的 RainSkills 专用 MCP 地址可用。
95
- 配置完成后重新触发同一指令即可。
137
+ `deploy`/`create` 含 `service_id` 时属于 existing,否则属于 new;`query`、`troubleshoot`、`modify` 始终属于 existing。意图不明确时先澄清,不执行 connect。target 只允许 `codex`、`claude`、`all`。连接前校验 intent,只执行其 scope 在契约中允许的完整 argv。只消费 schema 为 `rainskills.next-action.v1` 且完成字段校验后的 `argv` 数组。
96
138
 
97
- 例外:用户在同一会话里已经成功用过任意 `rainbond_*` 工具,则视为 preflight 已通过,不必每轮重探。
139
+ 连接或平台安装完成后,用固定 `onboarding-id` 执行 launcher + `["intent", "resume", "--onboarding-id", "<同一 onboarding-id>"]`,恢复原始 intent 和 `resume_step`,不得重新猜测动作。
98
140
 
99
- ## Installation Intent(高优先级)
141
+ 业务 MCP 返回 401 时,先执行 launcher + `["runtime", "record-failure", "--onboarding-id", "<同一 onboarding-id>", "--step", "<当前固定步骤>", "--reason", "credential-expired"]`,再仅一次执行 launcher + `["runtime", "reconnect", "--onboarding-id", "<同一 onboarding-id>"]`,然后 resume 并只重试该步骤;第二次 401 立即停止。403 时执行 launcher + `["runtime", "record-failure", "--onboarding-id", "<同一 onboarding-id>", "--step", "<当前固定步骤>", "--reason", "permission-denied"]` 后停止,不得 reconnect、重新授权或自动重试,只说明缺少的权限。
142
+ <!-- rainskills-runtime-gate:end -->
100
143
 
101
- 当用户的请求本身是"帮我把 rainskills / Rainbond MCP 装上"或等价表达(含 `github.com/goodrain/rainskills` URL)时,**禁止**走以下旁路:
144
+ <!-- rainskills-runtime-routing:start -->
145
+ ## 缺少运行环境时
102
146
 
103
- - 手工 `git clone` 后只复制部分 `rainbond-*` Skill
104
- - 手工编写 `~/.rainbond/mcp.env`、JWT、登录回调
105
- - 手工修改任一客户端配置来注册 MCP server
147
+ 先确认 intent 属于 new scope 还是 existing scope;确认前不展示环境选项。
106
148
 
107
- 必须给用户一行可直接复制的命令,由仓库内 `install.sh` 接管交互式登录、JWT 获取、MCP 注册和验证:
149
+ ### 意图不明确
108
150
 
109
- ```bash
110
- bash <(curl -fsSL https://raw.githubusercontent.com/goodrain/rainskills/main/install.sh)
111
- ```
151
+ 用户请求没有明确指向新应用或已有应用时,只问:“这是要部署新应用还是管理已有应用?”确认前不连接运行环境,也不展示任何环境选项。
152
+
153
+ ### 新应用
154
+
155
+ 用户明确要部署新应用后,先执行本地 launcher + `["runtime", "message", "--id", "new-application-environment"]`。收到 `[RAINSKILLS_USER_MESSAGE_BEGIN:<id>]` 与对应 END marker 后,只原样输出两者之间的正文,不输出 marker,不得总结、改写、调整项目符号或追加其它说明。下方文案仅用于核对,不得由 agent 自行生成:
156
+
157
+ > 可以,我会帮你完成应用识别、构建、部署和访问验证。
158
+ >
159
+ > 不过目前还没有可用的应用运行环境。
160
+ >
161
+ > 你刚安装的 Rainskills 是负责“部署”的 AI 助手,它会分析项目并执行部署流程;Rainbond 负责为应用提供稳定运行环境。
162
+ >
163
+ 此时只保存用户已经明确提供的 intent 字段。`deploy`/`create` 可以只保存 `type`;不得为了构造 runtime intent 提前补参数,平台安装完成前不得询问应用来源,包括本地项目路径、Git 仓库 URL、镜像地址或安装包路径。运行环境连接并通过验收后,恢复到 `project-analysis`,再识别当前项目或询问缺失的应用来源。
112
164
 
113
- 如果用户当前会话所在仓库就是 `rainbond-skills` 本身,可建议 `./install.sh`。
114
- 如果用户明确要求非默认仓库位置,告诉他用环境变量 `RAINBOND_SKILLS_HOME=<path>` 前置。
165
+ #### 选择运行环境
115
166
 
116
- 说明给用户:脚本会安装全部独立 Skill、引导浏览器登录、写 `~/.rainbond/mcp.env`、为 Codex / Claude Code / OpenClaw / Pi Agent 配置对应 MCP,并验证专用地址。不需要 AI 手工配置其中任何一步。
167
+ 请提示“请选择应用要运行的环境:”,并只显示:
168
+
169
+ 1) 云端环境(免费体验)
170
+ 2) 私有环境(去对接)
171
+
172
+ 用户选择私有环境后,立即执行本地 launcher + `["runtime", "message", "--id", "private-deployment-location"]`,并按同一消息协议原样输出块内正文:
173
+
174
+ 请选择部署位置:
175
+
176
+ 1、部署到本机
177
+ 2、部署到独立服务器
178
+ 3、部署到已有 Rainbond
179
+
180
+ 选择 1 时执行 `install-private` route,并在完整 argv 中使用 `["--location", "local"]`;选择 2 时执行 `install-private` route,并使用 `["--location", "server"]`;选择 3 时执行本地 launcher + `["runtime", "message", "--id", "private-console-origin"]`,收到地址后执行 `private-existing`。不得显示额外的接入方式中间步骤,不得在平台安装器中重复询问部署位置,也不得在环境准备完成前询问应用来源。
181
+
182
+ ### 已有应用
183
+
184
+ 用户明确要查询、排障、修改或验证已有应用时,使用与动作匹配的第一句话,只提供 `Rainbond Cloud` 或承载目标应用的`已有私有 Rainbond`。选择已有私有 Rainbond 时执行本地 launcher + `["runtime", "message", "--id", "private-console-origin"]` 并原样输出。已有应用不得安装新平台,也不得进入 install-private。
185
+ <!-- rainskills-runtime-routing:end -->
117
186
 
118
187
  ## 硬规则
119
188
 
@@ -127,6 +196,7 @@ description: "Use for any request to deploy, run, deliver, publish, or troublesh
127
196
  - 多个 team 且无 manifest 提示 → 停下来询问用户,**禁止**静默选 `default` / 第一个 / 任意已有 team。
128
197
  - app 选择同上逻辑:manifest 指定且可解析 → 直接用;无提示且多候选 → 询问。
129
198
  - 任何自动选择的结果都必须在最终报告里以"已选 X(理由:来自 manifest / 单一可选)"形式告知,邀请用户覆盖。
199
+ - 每个 Rainbond MCP 工具边界都要把十进制字符串 `app_id` 规范化为正整数;非数字 ID 必须拒绝。
130
200
  3. 单入口主线一旦触发:
131
201
  `project-init -> bootstrap -> troubleshooter -> delivery-verifier -> version-assistant -> testing-app delivery-verifier`
132
202
  应按 gate 自动继续,不要在中途停成“下一步建议”。
@@ -175,6 +245,7 @@ description: "Use for any request to deploy, run, deliver, publish, or troublesh
175
245
  16. 如果用户要求调整源码构建参数,优先走 `rainbond_manage_component_envs(operation=replace_build_envs, build_env_dict=...)`。
176
246
  不要把语言构建参数塞进 `build_info`。
177
247
  17. 如果源码检测同时命中 Dockerfile 和语言构建,按 `rainbond-fullstack-bootstrap` 的 Build Mode Selection 优先级链解决:manifest `source.build.strategy` 优先 → 启发式按 Dockerfile 分类 + 意图信号判断("语言 buildpack 能否产生等价运行时行为",原则驱动而非固定清单)→ 真正模糊时才问一次并建议用户写回 manifest。决策必须双轨可审计:prose 输出"Build mode for `<name>`: `<picked>` (`<source>` — `<reason>`; to override: `<hint>`)"逐组件展示,且 bootstrap 的结构化输出 `deployment_plan.workflow.build_strategy_decisions[<name>]` 同步记录(仅给有 dual detection 的组件填)。`dockerfile` 决策映射到 `rainbond_create_component_from_source` 的 `prefer_dockerfile_when_detected = true`。详见 `rainbond-fullstack-bootstrap/references/source-build-parameter-guide.md § Build Mode Selection`。
248
+ - **恢复例外按状态决定**:`checking` / `checked` / 未完成组件可以通过 `rainbond_get_component_check_result(prefer_dockerfile_when_detected=true)` 在原拓扑中取得 Dockerfile 证据,禁止删除。只有 `create_status=complete` 的 CNB 组件不存在通用原地切换能力时,才允许在已保存 topology and configuration snapshot、已向用户展示该完成状态并获得 explicit user confirmation 后删除并重建;任一证据缺失时只读停止。
178
249
  18. 当前 MCP 不支持显式 `dockerfile_path` 时,不要在顶层编排里承诺该能力。
179
250
  19. 对 reverse-proxy full-stack 项目,不要只因为根路径 URL 存在就把它当作最终交付成功或 Fast Path 的可信 URL;同 host 的 backend 路径(通常是 `/api`)必须也一致可用,或明确停在 blocker。
180
251
  20. **组件依赖与连接变量管理**(合并自原 20-23 四条):多组件拓扑里,provider/consumer 关系必须用显式依赖 + provider 侧连接变量管理,不要让 consumer 端硬编码或重复声明。
@@ -195,13 +266,16 @@ description: "Use for any request to deploy, run, deliver, publish, or troublesh
195
266
  24. 不要自动拉起本地 Docker Desktop/OrbStack、执行本地 Docker build/push、或推送临时镜像作为兜底;这属于 delivery-mode 策略切换,必须先得到用户明确确认。
196
267
  25. 每次运行内部仍必须形成 `AppAssistantResult` 结果对象,但默认用户答复不一定暴露 YAML。
197
268
  当 `source_app_delivery` 的 runtime healthy、没有 blocker、控制台部署位置和公网访问地址都已确定,且 delivery 已 `delivered` 或只剩浏览器人工确认时,默认使用简洁中文交付报告,不追加 `### Structured Output`。
198
- 26. 只有在自动化/评测/调试明确要求结构化结果、用户明确要求 YAML/JSON、结果仍在构建或异常、存在 blocker/handoff/身份歧义、或进入 dev-to-test promotion 时,才把 `AppAssistantResult` 渲染为最终 fenced `yaml`。仅因当前 agent 无法打开公网地址而需要用户确认,不是暴露 YAML 的理由。
269
+ 26. 只有在自动化/评测明确要求结构化契约,或用户明确要求 YAML、JSON、调试详情、内部状态对象时,才把 `AppAssistantResult` 渲染为最终 fenced `yaml`。部署失败、仍在构建、存在 blocker/handoff/身份歧义或进入 dev-to-test promotion 都不是默认暴露 YAML 的理由。
199
270
  27. 如果本次使用了 Git、镜像仓库或其他传输代理,必须在默认交付报告的处理记录或注意事项中说明;在结构化模式下也必须写入 `actions_performed[].details`。
200
271
  代理事实属于执行记录,不是强制暴露 YAML 的理由。
201
272
  28. `rbd-*` 组件(rbd-gateway、rbd-api、rbd-worker、rbd-chaos、rbd-db、rbd-mq、rbd-monitor、rbd-node 等)是 Rainbond 平台自身的基础设施组件,不是用户应用组件。
202
273
  - 可以用 `rainbond_query_region_rbd_components` 查询并展示它们的状态
203
274
  - 不能通过 MCP 对它们执行重启、部署、修改等写操作;当前 MCP 工具集不支持此类操作
204
- - 如果用户要求操作这些组件,明确告知:需要通过 Kubernetes 命令(如 `kubectl rollout restart deployment/<name> -n rbd-system`)或 Rainbond 集群管理控制台进行,超出本技能的操作范围,不要假装可以执行
275
+ - 如果用户要求操作这些组件,明确告知:需要通过 Kubernetes 命令(如 `kubectl rollout restart deployment/<name> -n rbd-system`)或 Rainbond 集群管理控制台进行,超出本技能的操作范围,不要假装可以执行
276
+ 28a. 写操作失败或结果异常时,先调用 `rainbond_get_operation_failure_context`,按其 `classified_reason` 决定停下、只读核实或低风险修复;`unknown` 回退既有证据链,禁止盲目重放写操作。
277
+ `event_log_tail` 只作为敏感诊断证据使用,绝不能复制、引用或向用户展示其原文;输出只能使用 `classified_reason`、非敏感摘要和已脱敏字段。
278
+ 28b. 运行态或交付健康检查先调用 `rainbond_get_app_health_overview`;仅 `abnormal` 或 `unknown` 组件再读取 component summary、日志、事件或存储明细。
205
279
  29. **仅给 bare Git URL 时默认 root + 空 `subdirectories`**:当用户给的只是一个 Git URL(无本地 manifest、无明确子目录提示),默认 `subdirectories=""`(仓库根)进入 source 检测,让后端判断这个仓库结构。**不要**先问用户"根目录还是子目录"。
206
280
  - 单项目仓库(一个 buildable root)→ 后端检测通过,正常 build
207
281
  - 多组件 / 多 example 仓库 → 后端返回 `multiple services detected` 或等价歧义信号 → 按 Iron Law 10 停下问用户选哪个子目录
@@ -900,13 +974,9 @@ description: "Use for any request to deploy, run, deliver, publish, or troublesh
900
974
  Use this mode when any of the following is true:
901
975
  - the user asks for structured output, YAML, JSON, debug details, or machine-readable output
902
976
  - an eval, wrapper, or automation flow explicitly needs deterministic structured schema validation
903
- - any concise delivery report condition above is not met
904
- - the app is building, unhealthy, blocked, identity-ambiguous, or requires handoff
905
- - `promotion_result` is non-null or the user requested dev-to-test promotion
906
- - there is any unresolved blocker or handoff
907
977
  - another skill or wrapper will consume the result as input
908
978
 
909
- Building, unhealthy, blocked, ambiguous, handoff, and incomplete promotion states should keep the detailed human-readable sections and evidence below. Do not make non-success output terse merely because successful output is concise.
979
+ 普通对话中的 building、unhealthy、blocked、ambiguous、handoff 和 incomplete promotion 结果仍使用“用户可见结果协议”,不得因为内部状态复杂就暴露结构化报告。
910
980
 
911
981
  In structured contract mode:
912
982
  - the human-readable sections below are the narrative view over `AppAssistantResult`
@@ -1260,6 +1330,10 @@ description: "Use for any request to deploy, run, deliver, publish, or troublesh
1260
1330
  - the opening fence must be exactly ````yaml` immediately after the heading
1261
1331
  - the closing fence must be the last non-whitespace line of the whole reply
1262
1332
 
1333
+ ## On-demand references
1334
+
1335
+ 根据当前阶段按需加载 [workflow rules](references/workflow-rules.md)、[operational reference](references/operational-reference.md)、[output contract](references/output-contract.md) 或 [product object model](references/product-object-model.md)。
1336
+
1263
1337
  ## Common Mistakes
1264
1338
 
1265
1339
  - running bootstrap when the topology already exists
@@ -21,10 +21,10 @@ AppAssistantResult:
21
21
  team_name: demo-team
22
22
  region_name: cn
23
23
  app_name: orders-app
24
- app_id: app-201
24
+ app_id: 201
25
25
  linked: true
26
26
  selected_environment: preview
27
- deployment_location_url: https://run.rainbond.com/#/team/demo-team/region/cn/apps/app-201/overview
27
+ deployment_location_url: https://run.rainbond.com/#/team/demo-team/region/cn/apps/201/overview
28
28
  environment:
29
29
  name: preview
30
30
  source: local_preference
@@ -46,7 +46,7 @@ AppAssistantResult:
46
46
  actions_performed:
47
47
  - skill: inspection-only
48
48
  status: completed
49
- details: Resolved the linked source app identity and current project intent from local binding plus current MCP truth.
49
+ details: Resolved the linked source app identity and current project intent from local binding plus current platform truth.
50
50
  - skill: rainbond-fullstack-bootstrap
51
51
  status: pending
52
52
  details: Selected as the next safe step because the linked source app still has no established topology.
@@ -21,10 +21,10 @@ AppAssistantResult:
21
21
  team_name: demo-team
22
22
  region_name: cn
23
23
  app_name: inventory-app
24
- app_id: app-202
24
+ app_id: 202
25
25
  linked: true
26
26
  selected_environment: preview
27
- deployment_location_url: https://run.rainbond.com/#/team/demo-team/region/cn/apps/app-202/overview
27
+ deployment_location_url: https://run.rainbond.com/#/team/demo-team/region/cn/apps/202/overview
28
28
  environment:
29
29
  name: preview
30
30
  source: local_preference
@@ -46,7 +46,7 @@ AppAssistantResult:
46
46
  actions_performed:
47
47
  - skill: inspection-only
48
48
  status: completed
49
- details: Resolved the linked source app state from current MCP truth without changing the source-backed path.
49
+ details: Resolved the linked source app state from current platform truth without changing the source-backed path.
50
50
  - skill: rainbond-fullstack-troubleshooter
51
51
  status: pending
52
52
  details: Selected because topology exists but source-backed components are still converging.
@@ -21,10 +21,10 @@ AppAssistantResult:
21
21
  team_name: demo-team
22
22
  region_name: cn
23
23
  app_name: billing-app
24
- app_id: app-203
24
+ app_id: 203
25
25
  linked: true
26
26
  selected_environment: preview
27
- deployment_location_url: https://run.rainbond.com/#/team/demo-team/region/cn/apps/app-203/overview
27
+ deployment_location_url: https://run.rainbond.com/#/team/demo-team/region/cn/apps/203/overview
28
28
  environment:
29
29
  name: preview
30
30
  source: explicit
@@ -46,7 +46,7 @@ AppAssistantResult:
46
46
  actions_performed:
47
47
  - skill: inspection-only
48
48
  status: completed
49
- details: Confirmed runtime convergence for the linked source app from current MCP truth.
49
+ details: Confirmed runtime convergence for the linked source app from current platform truth.
50
50
  - skill: rainbond-delivery-verifier
51
51
  status: pending
52
52
  details: Selected because runtime is healthy but delivery acceptance is still unknown.
@@ -7,7 +7,7 @@ assert:
7
7
  - preview
8
8
  - 部署位置
9
9
  - 访问地址
10
- - https://run.rainbond.com/#/team/demo-team/region/cn/apps/app-204/overview
10
+ - https://run.rainbond.com/#/team/demo-team/region/cn/apps/204/overview
11
11
  - https://demo-team-cn.rainbond.me/payments-app
12
12
  - 200 OK
13
13
  prose_not_contains:
@@ -5,7 +5,7 @@
5
5
  应用:`payments-app`
6
6
  环境:`preview`
7
7
 
8
- - 部署位置:[打开 Rainbond 应用](https://run.rainbond.com/#/team/demo-team/region/cn/apps/app-204/overview)
8
+ - 部署位置:[打开 Rainbond 应用](https://run.rainbond.com/#/team/demo-team/region/cn/apps/204/overview)
9
9
  - 访问地址:[打开应用](https://demo-team-cn.rainbond.me/payments-app)
10
10
 
11
11
  ### 运行状态
@@ -21,10 +21,10 @@ AppAssistantResult:
21
21
  team_name: demo-team
22
22
  region_name: cn
23
23
  app_name: orders-app
24
- app_id: app-205
24
+ app_id: 205
25
25
  linked: true
26
26
  selected_environment: preview
27
- deployment_location_url: https://run.rainbond.com/#/team/demo-team/region/cn/apps/app-205/overview
27
+ deployment_location_url: https://run.rainbond.com/#/team/demo-team/region/cn/apps/205/overview
28
28
  environment:
29
29
  name: preview
30
30
  source: explicit
@@ -57,7 +57,7 @@ AppAssistantResult:
57
57
  team_name: demo-team
58
58
  region_name: cn
59
59
  app_name: orders-app-test
60
- app_id: app-test-205
60
+ app_id: 205
61
61
  testing_delivery_state:
62
62
  status: delivered
63
63
  preferred_access_url: https://demo-team-cn.rainbond.me/orders-app-test
@@ -3,7 +3,7 @@ assert:
3
3
  equal:
4
4
  AppAssistantResult.request_intent: dev_to_test_promotion
5
5
  AppAssistantResult.orchestration_state: linked-and-needs-manual-url-validation
6
- AppAssistantResult.project.deployment_location_url: https://run.rainbond.com/#/team/demo-team/region/cn/apps/app-206/overview
6
+ AppAssistantResult.project.deployment_location_url: https://run.rainbond.com/#/team/demo-team/region/cn/apps/206/overview
7
7
  AppAssistantResult.delivery_state.status: delivered-but-needs-manual-validation
8
8
  AppAssistantResult.delivery_state.verification_mode: inferred
9
9
  AppAssistantResult.delivery_state.verifier_next_action: manual_url_validation
@@ -1,5 +1,5 @@
1
1
  ### Project State
2
- The project is `linked-and-needs-manual-url-validation` for the `preview` environment with team `demo-team`, region `cn`, app `manual-check-app`, and app_id `app-206`.
2
+ The project is `linked-and-needs-manual-url-validation` for the `preview` environment with team `demo-team`, region `cn`, app `manual-check-app`, and app_id `206`.
3
3
 
4
4
  ### Actions Performed
5
5
  This run resolved the linked source app state and completed `rainbond-delivery-verifier`. The user asked for the dev-to-test mainline, but the source app only reached manual URL validation, so promotion was not entered.
@@ -21,10 +21,10 @@ AppAssistantResult:
21
21
  team_name: demo-team
22
22
  region_name: cn
23
23
  app_name: manual-check-app
24
- app_id: app-206
24
+ app_id: 206
25
25
  linked: true
26
26
  selected_environment: preview
27
- deployment_location_url: https://run.rainbond.com/#/team/demo-team/region/cn/apps/app-206/overview
27
+ deployment_location_url: https://run.rainbond.com/#/team/demo-team/region/cn/apps/206/overview
28
28
  environment:
29
29
  name: preview
30
30
  source: explicit
@@ -2,7 +2,7 @@
2
2
  The project is `linked-and-cluster-capacity-blocked` for the `preview` environment with team `demo-team`, region `cn`, app `ops-dashboard`, and app_id `app-207`.
3
3
 
4
4
  ### Actions Performed
5
- This run resolved the linked source app state and current MCP/runtime evidence. `rainbond-fullstack-troubleshooter` was not entered because the dominant blocker is active cluster capacity shortage.
5
+ This run resolved the linked source app state and current platform evidence. `rainbond-fullstack-troubleshooter` was not entered because the dominant blocker is active cluster capacity shortage.
6
6
 
7
7
  ### Current Health
8
8
  db status running, api/service status running, frontend-access status capacity-blocked, overall status capacity_blocked.
@@ -21,10 +21,10 @@ AppAssistantResult:
21
21
  team_name: demo-team
22
22
  region_name: cn
23
23
  app_name: ops-dashboard
24
- app_id: app-207
24
+ app_id: 207
25
25
  linked: true
26
26
  selected_environment: preview
27
- deployment_location_url: https://run.rainbond.com/#/team/demo-team/region/cn/apps/app-207/overview
27
+ deployment_location_url: https://run.rainbond.com/#/team/demo-team/region/cn/apps/207/overview
28
28
  environment:
29
29
  name: preview
30
30
  source: local_preference
@@ -46,7 +46,7 @@ AppAssistantResult:
46
46
  actions_performed:
47
47
  - skill: inspection-only
48
48
  status: completed
49
- details: Confirmed the linked source app identity and active capacity blocker from current MCP truth.
49
+ details: Confirmed the linked source app identity and active capacity blocker from current platform truth.
50
50
  - skill: rainbond-fullstack-troubleshooter
51
51
  status: skipped
52
52
  details: Deferred because active cluster capacity shortage must be fixed before bounded runtime repair can continue.
@@ -21,10 +21,10 @@ AppAssistantResult:
21
21
  team_name: demo-team
22
22
  region_name: cn
23
23
  app_name: frontend-console
24
- app_id: app-208
24
+ app_id: 208
25
25
  linked: true
26
26
  selected_environment: preview
27
- deployment_location_url: https://run.rainbond.com/#/team/demo-team/region/cn/apps/app-208/overview
27
+ deployment_location_url: https://run.rainbond.com/#/team/demo-team/region/cn/apps/208/overview
28
28
  environment:
29
29
  name: preview
30
30
  source: local_preference
@@ -21,10 +21,10 @@ AppAssistantResult:
21
21
  team_name: demo-team
22
22
  region_name: cn
23
23
  app_name: catalog-app
24
- app_id: app-209
24
+ app_id: 209
25
25
  linked: true
26
26
  selected_environment: preview
27
- deployment_location_url: https://run.rainbond.com/#/team/demo-team/region/cn/apps/app-209/overview
27
+ deployment_location_url: https://run.rainbond.com/#/team/demo-team/region/cn/apps/209/overview
28
28
  environment:
29
29
  name: preview
30
30
  source: local_preference
@@ -1,5 +1,5 @@
1
1
  ### Project State
2
- The project is `linked-and-identity-ambiguous` for the `preview` environment. Current local binding and current MCP evidence still leave multiple safe team/app targets, so no single app identity can be emitted yet.
2
+ The project is `linked-and-identity-ambiguous` for the `preview` environment. Current local binding and current platform evidence still leave multiple safe team/app targets, so no single app identity can be emitted yet.
3
3
 
4
4
  ### Actions Performed
5
5
  This run only performed context resolution. No lower-level bootstrap, troubleshooter, delivery-verifier, or version flow was executed because the team/app identity is still ambiguous.
@@ -8,7 +8,7 @@ This run only performed context resolution. No lower-level bootstrap, troublesho
8
8
  No canonical runtime_state or delivery_state can be emitted yet because the team/app identity is still ambiguous.
9
9
 
10
10
  ### Blocking Issue
11
- Multiple safe team/app targets remain after reading local binding and current MCP evidence.
11
+ Multiple safe team/app targets remain after reading local binding and current platform evidence.
12
12
 
13
13
  ### Next Step
14
14
  stop and ask the user to choose the team/app identity
@@ -41,6 +41,6 @@ AppAssistantResult:
41
41
  actions_performed:
42
42
  - skill: inspection-only
43
43
  status: completed
44
- details: Local binding and current MCP evidence still leave multiple safe team/app targets.
44
+ details: Local binding and current platform evidence still leave multiple safe team/app targets.
45
45
  next_action: stop and ask the user to choose the team/app identity
46
46
  ```
@@ -21,10 +21,10 @@ AppAssistantResult:
21
21
  team_name: demo-team
22
22
  region_name: cn
23
23
  app_name: registry-app
24
- app_id: app-301
24
+ app_id: 301
25
25
  linked: true
26
26
  selected_environment: preview
27
- deployment_location_url: https://run.rainbond.com/#/team/demo-team/region/cn/apps/app-301/overview
27
+ deployment_location_url: https://run.rainbond.com/#/team/demo-team/region/cn/apps/301/overview
28
28
  environment:
29
29
  name: preview
30
30
  source: default
@@ -21,10 +21,10 @@ AppAssistantResult:
21
21
  team_name: demo-team
22
22
  region_name: cn
23
23
  app_name: catalog-app
24
- app_id: app-302
24
+ app_id: 302
25
25
  linked: true
26
26
  selected_environment: preview
27
- deployment_location_url: https://run.rainbond.com/#/team/demo-team/region/cn/apps/app-302/overview
27
+ deployment_location_url: https://run.rainbond.com/#/team/demo-team/region/cn/apps/302/overview
28
28
  environment:
29
29
  name: preview
30
30
  source: local_preference
@@ -21,10 +21,10 @@ AppAssistantResult:
21
21
  team_name: demo-team
22
22
  region_name: cn
23
23
  app_name: catalog-app
24
- app_id: app-303
24
+ app_id: 303
25
25
  linked: true
26
26
  selected_environment: preview
27
- deployment_location_url: https://run.rainbond.com/#/team/demo-team/region/cn/apps/app-303/overview
27
+ deployment_location_url: https://run.rainbond.com/#/team/demo-team/region/cn/apps/303/overview
28
28
  environment:
29
29
  name: preview
30
30
  source: local_preference
@@ -21,10 +21,10 @@ AppAssistantResult:
21
21
  team_name: demo-team
22
22
  region_name: cn
23
23
  app_name: catalog-app
24
- app_id: app-304
24
+ app_id: 304
25
25
  linked: true
26
26
  selected_environment: preview
27
- deployment_location_url: https://run.rainbond.com/#/team/demo-team/region/cn/apps/app-304/overview
27
+ deployment_location_url: https://run.rainbond.com/#/team/demo-team/region/cn/apps/304/overview
28
28
  environment:
29
29
  name: preview
30
30
  source: local_preference
@@ -0,0 +1,77 @@
1
+ # App Assistant operational reference
2
+
3
+ Load this reference only when checking a proposed route or reviewing a completed run.
4
+
5
+ ## Common Mistakes
6
+
7
+ - running bootstrap when the topology already exists
8
+ - running bootstrap for a template-install intent
9
+ - running troubleshooter before confirming the project is linked
10
+ - assuming env sync is mandatory for every run
11
+ - treating env files as runtime truth
12
+ - exposing a large YAML block for an eligible successful source delivery, including browser-confirmation-only delivery, when the user did not ask for structured/debug output
13
+ - reporting team/region/app identity as a substitute for the clickable Rainbond deployment location
14
+ - using the public service URL as the Rainbond deployment location, or constructing the public service URL from naming conventions
15
+ - stripping useful diagnostic evidence from building, blocked, unhealthy, ambiguous, handoff, or incomplete promotion states
16
+ - omitting the required `### Structured Output` section in structured contract mode
17
+ - replacing the required five human-readable sections with freeform narrative in structured contract mode
18
+ - treating a project as unlinked only because `.rainbond/local.json.metadata.status` is stale even though the platform confirms the same app in the current run
19
+ - omitting `Actions Performed` detail when the run only did inspection/classification and intentionally skipped downstream skills
20
+ - echoing raw platform labels such as `closed` instead of normalizing component status to the canonical vocabulary
21
+ - stopping after bootstrap even when bootstrap explicitly recommends troubleshooting
22
+ - skipping template version resolution before installation
23
+ - treating source build convergence as a finished healthy topology
24
+ - continuing application repair when scheduling is blocked by cluster capacity
25
+ - stopping at “running” without verifying delivery state or reporting access URL
26
+ - declaring the app healthy when only db/api are healthy but frontend access is still broken
27
+ - continuing platform-level repairs when the issue is clearly in code or reverse proxy configuration
28
+ - auto-entering version flow when delivery is only `delivered-but-needs-manual-validation`
29
+ - replacing the source-app meaning of `project` with the created testing app instead of recording testing identity under `promotion_result`
30
+ - recursively treating the created testing app as a brand-new source app in the same run
31
+ - silently degrading a source-backed component into an image-backed component after a source creation error
32
+ - silently rewriting the source branch or ref after a source creation error
33
+ - inventing `delivery_state.partially-delivered` before `rainbond-delivery-verifier` has actually run
34
+ - routing a control-plane or platform backend failure into `code_build_handoff`
35
+ - copying a frontend-only component state into `api_status`
36
+ - stopping the top-level app-assistant run at successful init even though the user asked for deploy or dev-to-test continuation
37
+ - silently selecting one team when multiple accessible teams existed and the user had not chosen one
38
+ - searching outside the current project directory for `rainbond.app.json` or `.rainbond/local.json`
39
+ - continuing into local code edits, local tests, commit, push, or automatic retry after reaching `code_build_handoff_needed`
40
+ - automatically switching from source-backed bootstrap to local package because source detection found multiple services
41
+ - starting local Docker/OrbStack, building locally, or pushing temporary images after a source/package/image path fails without explicit user confirmation
42
+ - spending 20-30 minutes repeatedly trying the same path instead of stopping at the attempt budget
43
+ - routing a clear source build failure straight to runtime logs without checking component events and build logs first
44
+ - using `build_info` as the default container for source build parameters
45
+ - promising `dockerfile_path` or defaulting to Dockerfile mode without explicit user intent
46
+
47
+ ## Quick Reference
48
+
49
+ Decision summary:
50
+ - no link -> link first
51
+ - no link -> `rainbond-project-init`
52
+ - template install intent -> `rainbond-template-installer`
53
+ - no topology -> bootstrap
54
+ - source build still converging -> troubleshooter
55
+ - explicit build failure question -> troubleshooter with `events -> build logs -> runtime logs`
56
+ - external artifact unreachable -> stop and request reachable mirror/egress or explicit strategy change
57
+ - cluster capacity blocked -> stop and fix platform capacity first
58
+ - topology exists but unhealthy -> troubleshoot
59
+ - runtime appears converged -> delivery verifier
60
+ - strict delivered plus explicit dev-to-test intent -> create snapshot and testing app
61
+ - delivered-but-needs-manual-validation -> stop for manual URL validation before promotion; use concise success output for source-only delivery when all concise-mode conditions are met
62
+ - runtime fixed but browser path broken -> code/build handoff
63
+ - healthy -> stop
64
+
65
+ Trust model:
66
+ - local files provide context
67
+ - the locked Rainbond transport provides runtime truth
68
+
69
+ Default orchestration:
70
+ 1. resolve context
71
+ 2. determine whether the run is source-only or dev-to-test mainline
72
+ 3. classify state
73
+ 4. choose lower-level skill
74
+ 5. continue until the current strict gate says stop
75
+ 6. if strict delivered and promotion was requested, snapshot and create testing app
76
+ 7. verify the testing app once
77
+ 8. report one next step