Это ide на основе vs code(code oss), в ней будет встроенный умный апи роутинг, свой маркет с плагинами(агент харнесс, поддержка java/kotlin/мобильной разработки, командная разработка проектов, orca, оркестратор агентов
/**
* Base Plan agent configuration - embedded from Plan.agent.md
* This avoids runtime file loading and YAML parsing dependencies.
*/
const
BASE_PLAN_AGENT_CONFIG
:
=
{
:
'Plan'
,
:
'Researches and outlines multi-step plans'
,
:
'Outline the goal or problem to research'
,
:
'vscode'
,
:
true
,
:
[
...
DEFAULT_READ_TOOLS
,
]
,
:
[
]
,
// Handoffs are generated dynamically in buildCustomizedConfig
:
''
// Body is generated dynamically in buildCustomizedConfig
}
;
/**
* Provides the Plan agent dynamically with settings-based customization.
*
* This provider uses an embedded configuration and generates .agent.md content
* with settings-based customization (additional tools and model override).
* No external file loading or YAML parsing dependencies required.
*/
export
class
PlanAgentProvider
extends
Disposable
implements
vscode
.
{
readonly
=
.
.
t
(
'Plan Agent'
)
;
private
static
readonly
CACHE_DIR
=
'plan-agent'
;
private
static
readonly
AGENT_FILENAME
=
`Plan${AGENT_FILE_EXTENSION}`
;
private
readonly
=
this
.
_register
(
new
vscode
.
EventEmitter<void>
(
)
)
;
readonly
=
this
.
.
;
private
readonly
:
;
constructor
(
@IConfigurationService
private
readonly
:
,
@IExperimentationService
private
readonly
:
,
@IInstantiationService
:
,
)
{
super
(
)
;
this
.
=
.
createInstance
(
,
.
CACHE_DIR
,
.
AGENT_FILENAME
,
'PlanAgentProvider'
)
;
// Listen for settings changes to refresh agents
// Note: When settings change, we fire onDidChangeCustomAgents which causes VS Code to re-fetch
// the agent definition. However, handoff buttons already rendered may not work as
// these capture the model at render time.
this
.
_register
(
this
.
.
onDidChangeConfiguration
(
=>
{
if
(
.
affectsConfiguration
(
.
.
)
||
.
affectsConfiguration
(
.
.
.
)
||
.
affectsConfiguration
(
'chat.planAgent.defaultModel'
)
||
.
affectsConfiguration
(
.
.
)
||
.
affectsConfiguration
(
.
.
)
||
.
affectsConfiguration
(
.
.
.
)
)
{
this
.
.
fire
(
)
;
}
}
)
)
;
}
async
provideCustomAgents
(
:
unknown
,
:
.
)
:
Promise
<
.
[
]
>
{
// Build config with settings-based customization
const
=
this
.
buildCustomizedConfig
(
)
;
// Generate .agent.md content
const
=
buildAgentMarkdown
(
)
;
// Write to cache file and return URI
const
=
await
this
.
.
write
(
)
;
return
[
{
:
,
:
[
'local'
]
}
]
;
}
static
buildAgentBody
(
:
boolean
,
:
boolean
)
:
string
{
let
:
string
;
if
(
)
{
=
`## 1. Discovery
Run the *Explore* subagent to gather context, analogous existing features to use as implementation templates, and potential blockers or ambiguities. When the task spans multiple independent areas (e.g., frontend + backend, different features, separate repos), launch **2-3 *Explore* subagents in parallel** — one per area — to speed up discovery.
Update the plan with your findings.`
;
}
else
if
(
)
{
=
`## 1. Discovery
Use #tool:searchSubagent to gather context, analogous existing features to use as implementation templates, and potential blockers or ambiguities. When the task spans multiple independent areas (e.g., frontend + backend, different features, separate repos), launch **2-3 search subagents in parallel** — one per area — to speed up discovery.
Update the plan with your findings.`
;
}
else
{
=
`## 1. Discovery
Search the codebase to gather context, analogous existing features to use as implementation templates, and potential blockers or ambiguities.
Update the plan with your findings.`
;
}
return
`You are a PLANNING AGENT, pairing with the user to create a detailed, actionable plan.
You research the codebase → clarify with the user → capture findings and decisions into a comprehensive plan. This iterative approach catches edge cases and non-obvious requirements BEFORE implementation begins.
Your SOLE responsibility is planning. NEVER start implementation.
**Current plan**: \`/memories/session/plan.md\` - update using #tool:vscode/memory .
<rules>
- STOP if you consider running file editing tools — plans are for others to execute. The only write tool you have is #tool:vscode/memory for persisting plans.
- Use #tool:vscode/askQuestions freely to clarify requirements — don't make large assumptions
- Present a well-researched plan with loose ends tied BEFORE implementation
</rules>
<workflow>
Cycle through these phases based on user input. This is iterative, not linear. If the user task is highly ambiguous, do only *Discovery* to outline a draft plan, then move on to alignment before fleshing out the full plan.
${discoverySection}
## 2. Alignment
If research reveals major ambiguities or if you need to validate assumptions:
- Use #tool:vscode/askQuestions to clarify intent with the user.
- Surface discovered technical constraints or alternative approaches
- If answers significantly change the scope, loop back to **Discovery**
## 3. Design
Once context is clear, draft a comprehensive implementation plan.
The plan should reflect:
- Structured concise enough to be scannable and detailed enough for effective execution
- Step-by-step implementation with explicit dependencies — mark which steps can run in parallel vs. which block on prior steps
- For plans with many steps, group into named phases that are each independently verifiable
- Verification steps for validating the implementation, both automated and manual
- Critical architecture to reuse or use as reference — reference specific functions, types, or patterns, not just file names
- Critical files to be modified (with full paths)
- Explicit scope boundaries — what's included and what's deliberately excluded
- Reference decisions from the discussion
- Leave no ambiguity
Save the comprehensive plan document to \`/memories/session/plan.md\` via #tool:vscode/memory, then show the scannable plan to the user for review. You MUST show plan to the user, as the plan file is for persistence only, not a substitute for showing it to the user.
## 4. Refinement
On user input after showing the plan:
- Changes requested → revise and present updated plan. Update \`/memories/session/plan.md\` to keep the documented plan in sync
- Questions asked → clarify, or use #tool:vscode/askQuestions for follow-ups
- Alternatives wanted → loop back to **Discovery** with new subagent
- Approval given → acknowledge, the user can now use handoff buttons
Keep iterating until explicit approval or handoff.
</workflow>
<plan_style_guide>
\`\`\`markdown
## Plan: {Title (2-10 words)}
{TL;DR - what, why, and how (your recommended approach).}
**Steps**
1. {Implementation step-by-step — note dependency ("*depends on N*") or parallelism ("*parallel with step N*") when applicable}
2. {For plans with 5+ steps, group steps into named phases with enough detail to be independently actionable}
**Relevant files**
- \`{full/path/to/file}\` — {what to modify or reuse, referencing specific functions/patterns}
**Verification**
1. {Verification steps for validating the implementation (**Specific** tasks, tests, commands, MCP tools, etc; not generic statements)}
**Decisions** (if applicable)
- {Decision, assumptions, and includes/excluded scope}
**Further Considerations** (if applicable, 1-3 items)
1. {Clarifying question with recommendation. Option A / Option B / Option C}
2. {…}
\`\`\`
Rules:
- NO code blocks — describe changes, link to files and specific symbols/functions
- NO blocking questions at the end — ask during workflow via #tool:vscode/askQuestions
- The plan MUST be presented to the user, don't just mention the plan file.
</plan_style_guide>`
;
}
private
buildCustomizedConfig
(
)
:
{
const
=
this
.
.
getConfig
(
.
)
;
const
=
this
.
.
getExperimentBasedConfig
(
.
,
this
.
)
;
const
=
this
.
.
getExperimentBasedConfig
(
.
.
,
this
.
)
;
const
=
this
.
.
getNonExtensionConfig<string>
(
'chat.planAgent.defaultModel'
)
;
const
=
||
this
.
.
getConfig
(
.
.
)
;
const
=
this
.
.
getConfig
(
.
)
;
// Build handoffs dynamically with model override
const
:
=
{
:
'Start Implementation'
,
:
'agent'
,
:
'Start implementation'
,
:
true
,
...
(
?
{
:
}
:
{
}
)
}
;
const
:
=
{
:
'Open in Editor'
,
:
'agent'
,
:
'#createFile the plan as is into an untitled file (`untitled:plan-${camelCaseName}.prompt.md` without frontmatter) for further refinement.'
,
:
false
,
:
true
}
;
// Collect tools to add
const
:
string
[
]
=
[
...
]
;
// Always include askQuestions tool (now provided by core)
.
push
(
'vscode/askQuestions'
)
;
// When explore agent is enabled, include the 'agent' tool to allow sub-agent calls
if
(
)
{
.
push
(
'agent'
)
;
}
// Merge additional tools (deduplicated)
const
=
.
>
0
?
[
...
new
Set
(
[
...
BASE_PLAN_AGENT_CONFIG
.
,
...
]
)
]
:
[
...
BASE_PLAN_AGENT_CONFIG
.
]
;
// Start with base config
return
{
...
BASE_PLAN_AGENT_CONFIG
,
// When explore agent is enabled, allow the Explore subagent