Skip to content

Reduce user interaction; Remove App version instructions - #27

Open
Steven J (tonystevenj) wants to merge 2 commits into
mainfrom
users/hongjingwang/reduce-user-interaction
Open

Reduce user interaction; Remove App version instructions#27
Steven J (tonystevenj) wants to merge 2 commits into
mainfrom
users/hongjingwang/reduce-user-interaction

Conversation

@tonystevenj

@tonystevenj Steven J (tonystevenj) commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Reduce unnecessary questions during app creation by inferring sensible defaults from the user’s prompt; Remove App version instructions

  • Generate the app and folder names automatically.
  • Plan all requested capabilities and ask for approval once.
  • Infer UI, data, and connector choices when possible.
  • Scaffold in the current folder when empty; otherwise use an inferred subfolder.
  • Skip optional CLI upgrade prompts during creation.
  • Update related documentation and bump the plugin version to 2.0.3.
  • Removed instructions related to app version

Compared public and updated plugin flows using the same prompt:

  • Public 2.0.2: 7 questions
  • Updated 2.0.3: 1 expected plan approval question

The agent will now infer as much as possible and generate a detailed plan for the user to review. Once the user approves it, the agent will execute the plan. My north star for this change was to make the flow as simple as possible:

User provides one prompt => Agent generates a detailed plan => User approves => App is generated

Ideally, the user only needs to take one action: approve the plan. Someone who just wants to try the plugin can generate an app in two clicks. More experienced users can work with the agent to refine the plan before approving it. I think this creates a good experience for both groups.

@Anshulmsft

Copy link
Copy Markdown
Collaborator

Could we validate this behavior with a few intent-based prompts before merging? The goal is to confirm that the generated app uses the appropriate connector rather than silently falling back to mock data when the user clearly expects real organizational data.

Suggested prompts and expected behavior:

  • Create an app that shows my meetings for the next 7 days. → Office 365 Outlook
  • Create an app that helps me prepare for my meetings over the next 7 days and uses Work IQ to generate a summary. → Office 365 Outlook + Work IQ
  • Create an app that shows my org chart, manager, and direct reports. → Office 365 Users (discovered through the generic connector flow)
  • Create an app that shows my unread emails from this week. → Office 365 Outlook
  • Create a simple personal habit tracker. → local/sample data is reasonable

The current phrase “only when the prompt explicitly requests external or organizational data” may be interpreted too narrowly because users usually express intent (my meetings, my emails, our org chart) rather than explicitly asking for organizational data or naming a connector.

Suggested wording:

Infer data needs from user intent. Add the appropriate connector whenever the requested experience clearly depends on user, organizational, shared, persistent, or external data, even if the user does not mention a connector. Treat phrases such as “my meetings,” “my emails,” and “our org chart” as organizational-data intent. Use local sample data only when the experience is genuinely self-contained or the data intent is unclear. Ask one focused question only when choosing incorrectly would materially change the app.

4. Resolve all ambiguity now — easier than re-planning mid-scaffold. The user should approve the plan once and not be asked to approve sub-steps later.
1. **Generate the display name.** Derive a short title from the user's prompt (usually 2-5 title-cased words) and use it with `--display-name`. Do not ask the user to name or confirm it. Derive the folder slug from this title.
2. **Plan the complete requested experience.** Include every capability the user clearly describes. Infer the screens, navigation, interactions, and visual styling needed to make those capabilities usable; use a single responsive screen only when it can support the full request cleanly. Do not ask separate questions about layout, theme, or architecture. Present these decisions in the plan for approval.
3. **Infer data needs conservatively.** Add a connector only when the prompt explicitly requests external or organizational data, or the core workflow cannot be useful without it. Otherwise build a functional local-first prototype with realistic starter data and interactions; do not ask a generic data-source question.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we validate this rule with a few intent-based prompts before merging, to confirm the generated app selects real connectors rather than mock data when organizational-data intent is clear?

  • Show my meetings for the next 7 days. → Office 365 Outlook
  • Help me prepare for my meetings over the next 7 days and use Work IQ to generate a summary. → Office 365 Outlook + Work IQ
  • Show my org chart, manager, and direct reports. → Office 365 Users via the generic connector flow
  • Show my unread emails from this week. → Office 365 Outlook
  • Create a personal habit tracker. → local/sample data is reasonable

“Only when the prompt explicitly requests external or organizational data” may be too narrow: users normally express intent such as “my meetings” or “our org chart,” rather than naming a connector or explicitly saying “organizational data.” Suggested wording:

Infer data needs from user intent. Add the appropriate connector whenever the requested experience clearly depends on user, organizational, shared, persistent, or external data, even if the user does not mention a connector. Use local sample data only when the experience is genuinely self-contained or the data intent is unclear. Ask one focused question only when choosing incorrectly would materially change the app.

The CLI creates a new folder for the project. Derive a folder name from the display name (lowercase, hyphens, no spaces — e.g. "Sample One" → `sample-one`). Run the command from the **current working directory**; the CLI will create the subfolder automatically.
Derive a folder name from the display name (lowercase, hyphens, no spaces — e.g. "Sample One" → `sample-one`), then inspect the **current working directory**, including hidden entries:

- **Current directory is empty:** set `FOLDER_NAME="."` and scaffold directly into it. Do not ask for a path or app name.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This conflicts with the shared planning policy, which requires app_generated_plan.md under <PROJECT_ROOT> before ExitPlanMode. If the current directory starts empty, writing that file first makes ms app create . fail because the CLI requires the target to be completely empty.

Since ms app create also initializes the Git repository, the plan should become part of that repository. I think the intended order should be:

  1. Generate and approve the plan in plan mode.
  2. Run ms app create while the target is still empty.
  3. Set PROJECT_ROOT.
  4. Immediately write the approved plan to <PROJECT_ROOT>/app_generated_plan.md before implementing the app.

Could we update both this workflow and shared/planning-policy.md to state that the plan dump is deferred until immediately after scaffolding for new apps? It will then be tracked with the rest of the generated app instead of preventing creation.

Derive a folder name from the display name (lowercase, hyphens, no spaces — e.g. "Sample One" → `sample-one`), then inspect the **current working directory**, including hidden entries:

- **Current directory is empty:** set `FOLDER_NAME="."` and scaffold directly into it. Do not ask for a path or app name.
- **Current directory is not empty:** keep the inferred folder name as `FOLDER_NAME`. If that child path already exists, select the first available numbered variant (`sample-one-2`, `sample-one-3`, etc.); never overwrite an existing directory. Tell the user: _"Found current folder is not empty. I'll create the app in this subfolder: `<FOLDER_NAME>`."_ Continue immediately without asking for confirmation.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we test this specifically when /create-app is invoked from the root of an existing Microsoft App?

The current rule selects a child folder whenever the current directory is non-empty. PR bic/PowerPlatform-Managed-Host#1214 allows that path and initializes Git there, so this scenario would create a nested Git repository inside the existing app. That also conflicts with Step 1, which says a clearly different app should be created as a sibling project.

The likely intended behavior seems to be:

  • Existing Microsoft App root → create the new app beside it, under the current project's parent directory.
  • Generic non-empty workspace/folder → create the app in the inferred child folder as described here.
  • Empty folder → create directly in ..

Please verify those three scenarios against the updated CLI and clarify the folder-selection rule accordingly. At minimum, we should avoid silently creating a nested app repository inside another app repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants