You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(build-cli): add flub ai command and AI-enabled (Insiders) devcontainer (#27020)
## Summary
- Adds a `flub ai` command that launches an interactive Copilot SDK
session to help users pick the right agent alias and MCP server
configuration
- Creates a new **AI-enabled (Insiders)** devcontainer profile that
builds the flub CLI from source during prebuild, making `flub ai`
available in the codespace
- Updates the base **AI-enabled** profile: simplifies lifecycle hook
shapes (object → string), adds `COREPACK_ENABLE_DOWNLOAD_PROMPT=0` env
var, and removes `postAttachCommand` that opened Getting Started in VS
Code (unreliable since `code` is not always on PATH)
- Insiders differs from the base by name, `onCreateCommand` chaining
`install-flub.sh`, and `openFiles` path
- Shared files like `launcher-prompt.md` live in `ai-agent/` only; `flub
ai` searches `ai-agent-insiders/` first then falls back to `ai-agent/`
- Adds `FLUB_PERF=1` env var support for oclif performance diagnostics
Copy file name to clipboardExpand all lines: .devcontainer/README.md
+37-1Lines changed: 37 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,7 @@ This repo includes multiple Codespaces/devcontainer profiles under `.devcontaine
7
7
|`Standard`|`.devcontainer/devcontainer.json`| Full-repo development, heavier tasks, and broad day-to-day work. |
8
8
|`Lightweight (Review/Docs)`|`.devcontainer/lightweight/devcontainer.json`| Docs, API review, and focused edits with lower compute requirements. |
9
9
|`AI-enabled`|`.devcontainer/ai-agent/devcontainer.json`| AI-agent-assisted workflows with additional default CLI tooling. |
10
+
|`AI-enabled (Insiders)`|`.devcontainer/ai-agent-insiders/devcontainer.json`| AI-enabled plus the `flub ai` launcher command (builds the flub CLI from source). |
10
11
11
12
## Selecting a profile in Codespaces
12
13
@@ -33,6 +34,41 @@ The devcontainer lifecycle hooks are structured for prebuild optimization:
The devcontainer spec does not support config inheritance, so `devcontainer.json` is duplicated across the two profiles. Content files use a **fallback** pattern instead: the `flub ai` command searches `ai-agent-insiders/` first, then falls back to `ai-agent/`. This means files can be placed in one of two ways:
54
+
55
+
| Strategy | Where to put the file | When to use |
56
+
| --- | --- | --- |
57
+
|**Shared**|`ai-agent/` only | File is identical for both profiles. Insiders inherits it via fallback. |
58
+
|**Overridden**| Both `ai-agent/` and `ai-agent-insiders/`| File differs between profiles (e.g. the insiders version mentions `flub ai`). |
59
+
60
+
Current layout:
61
+
62
+
| File |`ai-agent/`|`ai-agent-insiders/`| Notes |
63
+
| --- | --- | --- | --- |
64
+
|`devcontainer.json`| yes | yes | Must exist in both (no inheritance in spec). |
65
+
|`launcher-prompt.md`| yes | — | Shared. Insiders finds it via fallback. |
66
+
|`GETTING_STARTED.md`| yes | yes | Overridden. Insiders version adds the `flub ai` section. |
67
+
|`first-run-notice.txt`| yes | yes | Overridden. Insiders version adds the `flub ai` line. |
68
+
69
+
### Maintenance rules
70
+
71
+
-**Shared config changes** (extensions, features, runArgs, host requirements, etc.) must be applied to both `devcontainer.json` files.
72
+
-**Shared content** (like `launcher-prompt.md`) should live in `ai-agent/` only. Do not duplicate it into insiders — the fallback handles it.
73
+
-**To promote an insiders feature to the base profile**, copy the relevant lines from the insiders files into the `ai-agent/` versions, then delete the insiders overrides so they fall back to the now-updated shared copy.
74
+
-**To remove an insiders override**, just delete the file from `ai-agent-insiders/`. The `flub ai` command will find the `ai-agent/` fallback automatically.
This codespace is pre-configured for AI-agent-assisted development of the Fluid Framework. It includes [agency](https://aka.ms/agency), [repoverlay](https://github.com/tylerbutler/repoverlay), GitHub CLI, and SSH access.
4
+
5
+
> For full documentation, see the [AI-enabled Codespace wiki page](https://github.com/microsoft/FluidFramework/wiki/AI%E2%80%90enabled-Codespace).
6
+
7
+
## First-time Setup
8
+
9
+
Agency is installed automatically the first time you run `dev`, `claude`, or any agent alias - watch for a browser authentication popup.
10
+
If automatic installation fails, you can install agency manually via `pnpm install:agency`.
11
+
12
+
> [!NOTE]
13
+
> Agency installation is supported in **VS Code** (desktop or SSH).
14
+
> It may not work in a browser-based Codespace because the OAuth redirect requires a local browser and authentication may not complete correctly.
15
+
16
+
> [!TIP]
17
+
> After creating a new AI-enabled Codespace you may be prompted to authenticate several times.
18
+
> It may seem excessive, but is expected - just keep clicking through each prompt until they stop.
19
+
20
+
## Quick Start
21
+
22
+
If dependencies are not installed yet or you need to reinstall them:
23
+
24
+
```bash
25
+
pnpm install
26
+
27
+
# Build everything
28
+
pnpm build
29
+
30
+
# Build only a specific package and its dependencies
31
+
pnpm fluid-build .
32
+
```
33
+
34
+
## Not sure which agent to use?
35
+
36
+
Run `flub ai` — an interactive assistant that asks what you want to do and launches the right agent for you.
37
+
38
+
## AI Agent Aliases
39
+
40
+
These aliases are available in all terminal sessions (after installing agency):
41
+
42
+
### Claude
43
+
44
+
| Alias | Command | Purpose |
45
+
|---|---|---|
46
+
|`dev`|`repoverlay switch --copy nori && agency claude ... -- --model opus`| Launch Claude optimized for feature work and debugging |
47
+
|`claude`|`repoverlay remove --all && agency claude ... -- --model opus`| General purpose Claude Code agent |
48
+
49
+
### Copilot
50
+
51
+
| Alias | Command | Purpose |
52
+
|---|---|---|
53
+
|`copilot`|`agency copilot`| Standard GitHub Copilot |
The built-in aliases include at least ADO, WorkIQ, and EngHub MCP servers.
59
+
You can also launch an agent with your own combination of MCP servers using the `--mcp` flag.
60
+
Stack as many as you need (and watch for browser authentication popups).
61
+
62
+
```bash
63
+
# Claude with an additional Kusto MCP server (ADO, WorkIQ, and EngHub are always included)
64
+
claude --mcp 'kusto --service-uri https://kusto.aria.microsoft.com'
65
+
66
+
# Copilot with an additional MCP server
67
+
copilot --mcp 'workiq'
68
+
```
69
+
70
+
> Run `agency mcp --help` to see all available MCP servers and their options.
71
+
72
+
### Utility
73
+
74
+
| Alias | Command | Purpose |
75
+
|---|---|---|
76
+
|`ai-reset`|`repoverlay remove --all`| Remove all repoverlay overlays and reset to clean state |
77
+
78
+
## More Information
79
+
80
+
-[AI-enabled Codespace wiki](https://github.com/microsoft/FluidFramework/wiki/AI%E2%80%90enabled-Codespace) — Full documentation for this codespace profile
81
+
-[DEV.md](../../DEV.md) — Development setup, build commands, and workflow guide
You are a launcher assistant for the Fluid Framework. Your job is to help the user pick the right AI agent alias and MCP server configuration for their task.
6
+
7
+
## Your Behavior
8
+
1. Greet the user briefly and ask what they want to accomplish today.
9
+
2. Ask clarifying questions if needed to understand their task, one question at a time.
10
+
3. Once you know enough, call select_alias with your recommendation.
11
+
4. NEVER recommend aliases that don't exist in the alias definitions below.
12
+
5. Keep the conversation short — usually 1-2 questions is enough.
13
+
14
+
## Alias Definitions (source of truth)
15
+
16
+
The following shell script defines the available aliases. Each shell function IS an alias.
17
+
Study the function bodies to understand what each alias does (which agent it launches,
18
+
which overlays it applies, which MCP servers it includes by default).
19
+
20
+
```bash
21
+
{{aliasFileContent}}
22
+
```
23
+
24
+
## Getting Started Guide
25
+
26
+
The following guide is shown to users when they first start working.
27
+
Use it to understand the aliases, MCP server options, and recommended workflows.
28
+
29
+
{{gettingStartedContent}}
30
+
31
+
## Guidelines
32
+
- ONLY recommend aliases that exist as functions in the alias definitions above.
33
+
- When calling select_alias, the alias value must exactly match a function name from the script.
34
+
- Most developers doing feature work should use `dev`.
35
+
- For OCE/incident work, always recommend `oce`.
36
+
- For general questions or exploration without a specific workflow, recommend `claude`.
37
+
- Only suggest `ai-reset` if the user explicitly mentions overlay problems.
38
+
- Don't overload with MCP servers — only suggest extras if the task clearly needs them.
39
+
- When in doubt between `dev` and `claude`, prefer `dev` for any coding task.
40
+
41
+
---
42
+
43
+
Begin now. Greet the user and ask what they'd like to do today.
0 commit comments