Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@
],
"preview": true,
"activationEvents": [
"onStartupFinished",
"onFileSystem:azureResourceGroups",
"onLanguageModelTool:azureResources_getAzureActivityLog",
"workspaceContains:**/.azure/project-plan.md",
"workspaceContains:**/.azure/requirements.json",
"workspaceContains:**/.azure/vscode-debug-plan.md"
Expand Down
14 changes: 13 additions & 1 deletion resources/agents/azure-project-plan.agent.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: azure-project-plan
description: Plan and design a NEW Azure-centric project — gather requirements interactively, produce an approved `.azure/project-plan.md`, then hand off to the `azure-project-scaffold` agent for execution. WHEN "plan project", "design app", "new project", "project requirements", "create project plan", "plan my app", "what should I build", "new Azure app", "create testable app", "new API project", "full-stack Azure app", "bootstrap project", "new fullstack project", "create functions project".
description: "Use this agent ONLY when the user explicitly wants to deploy or host their app on Azure. The user must mention Azure, 'deploy to Azure', 'host on Azure', or 'deploy to the cloud'. Matches: 'create an app and deploy it to Azure', 'build me a website and host it on Azure', 'I want to deploy this to Azure', 'create this project and deploy to Azure', 'build and deploy to Azure', 'new Azure app', 'deploy to the cloud'. Do NOT use this agent if the user just wants to create an app without mentioning Azure deployment."
tools: [vscode, run_vscode_command, tool_search, execute, read, agent, browser, edit, search, web, azure-mcp/search, todo]
model: ['Claude Opus 4.6 (copilot)', 'Claude Opus 4.7 (copilot)', 'Claude Sonnet 4.6 (copilot)']
---
Expand Down Expand Up @@ -35,6 +35,18 @@ The phases below are **strictly ordered**. You **must not** start a later phase
8. **Step D** — wait for the user's explicit approval of the plan. Mandatory.
9. **Step E** — hand off to the `azure-project-scaffold` agent (see below). Do not begin scaffolding inline.

### Step 0 — open the loading view (MANDATORY, your very first action)

**Trigger:** the instant this agent is invoked. Before reading any files, before writing requirements, before doing anything else — open the loading view.

**Action — call `run_vscode_command` immediately, before any other output:**

```json
{ "commandId": "azureResourceGroups.openLoadingView", "name": "Open Loading View", "args": [0, "Gathering project requirements…", "Copilot is analyzing your prompt and preparing the requirements questionnaire."] }
```

`run_vscode_command` is a deferred tool. If it isn't already loaded, call `tool_search` first with the query `run_vscode_command` (or "run vscode command") to load it, **then** invoke it. This shows the user a loading indicator while you work. Do not skip this step.

### Step A — open the requirements view (MANDATORY when requirements.json was written)

**Trigger:** the instant the skill finishes writing `.azure/requirements.json` (Step 2c). This must happen **before** you stop and wait for the user. Skip Step A entirely when the skill's Step 2e skip rule applied (all questions inferred, no file written) — in that case jump to writing the plan and Step C.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,39 @@

import { type IActionContext } from "@microsoft/vscode-azext-utils";
import * as vscode from 'vscode';
import { ensureAgentInstructions } from "../../../commands/copilotOnRails/agentInstructions";
import { ensureCopilotChatReady } from "../../../commands/copilotOnRails/openChatWithAgent";
import { projectSubmissionState } from "../../../tree/project/projectSubmissionState";
import { CreateProjectViewController } from "./controllers/CreateProjectViewController";
import { copilotOnRailsCommandIds } from "./copilotOnRailsCommands";
import { openLoadingView } from "./openLoadingView";

const localDev = vscode.l10n.t('Local Development');
const deploy = vscode.l10n.t('Deploy');

export async function createProjectWithCopilot(_context: IActionContext): Promise<void> {
export async function createProjectWithCopilot(_context: IActionContext, projectDescription?: string): Promise<void> {
// When invoked from the LM tool with a description, skip the webview and go straight to planning.
if (projectDescription) {
if (!(await ensureCopilotChatReady())) {
return;
}
if (!(await ensureAgentInstructions('azure-project-plan'))) {
return;
}
await vscode.commands.executeCommand('workbench.action.chat.newChat');
await vscode.commands.executeCommand('workbench.action.chat.open', {
mode: 'azure-project-plan',
query: projectDescription,
});
projectSubmissionState.setPending();
openLoadingView({
stage: 0,
title: vscode.l10n.t('Gathering project requirements…'),
message: vscode.l10n.t('Copilot is analyzing your prompt and preparing the requirements questionnaire.'),
});
return;
}

// Local Development => Deploy
if (await hasCompletedPhase('.azure/vscode-debug-plan.md', 'implemented')) {
const choice = await vscode.window.showInformationMessage(
Expand Down
Loading