Skip to content
Merged
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
4 changes: 2 additions & 2 deletions docs-web/content/docs/developer-http-api.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -173,9 +173,9 @@ This page lists every endpoint, grouped by domain. Path parameters use `:name` n

The GET response is an array of notices with `projectId`, `role`, `baseAgentPresetId`, `selectedAgentPresetId`, `selectedAgentName`, `reason`, `currentRevision`, and `availableRevision`. `reason` is `customized_instructions` or `alternate_route`. Planning and Project manager targets are resolved independently from `agents.routing.planning.agentPresetId` and `agents.routing.dashboardReply.agentPresetId`, using their named built-ins when the route value is null. Worker, Quality assurance agent, and Project Setup Agent are outside this contract.

POST requires a current notice and a supported local provider resolved through the `planning` invocation route. It records `agent_base_update` telemetry, sends the previous base, current bundle, and selected preset to the provider, and accepts exactly one raw JSON object containing one non-empty string property, `instructionMarkdown`. The validated result must retain every original selected-preset line in order. Immediately before writing, the service verifies that the selected routed preset still matches the notice.
POST requires a current notice and a supported local provider resolved through the `planning` invocation route. It records execution invocation type `agent_base_update` and sends the previous base, current bundle, and selected preset to the provider. The provider prompt requests raw JSON only, but the server parser tolerates supported presentation noise such as surrounding text, markdown fences, and provider response envelopes. After extraction, the payload must be a non-array JSON object containing exactly one non-empty string property, `instructionMarkdown`, and no other properties. Extraction, payload-shape, and line-preservation errors continue through the structured corrective retry path in the same provider session. The validated result must retain every original selected-preset line in order. Immediately before writing, the service verifies that the selected routed preset still matches the notice.

Only instruction markdown is writable, and only compatibility-critical system additions are requested. The main prompt, custom behavior, avatar, labels, routing, provider/model, memory, MCP access, persistent skills, and source metadata remain unchanged. An invalid role returns `400`; an unknown project returns `404`; disabled endpoint wiring returns `404`. A missing or stale notice, unsupported provider, invalid response, or concurrent route change is rejected, while provider execution failures propagate as request errors. All failures occur before the preset write and bundled-revision advance. A successful response is the updated `AgentPresetRecord` and advances the selected preset's role revision even if its preserved markdown does not equal the current bundle.
Only instruction markdown is writable, and only compatibility-critical system additions are requested. The main prompt, custom behavior, avatar, labels, routing, provider/model, memory, MCP access, persistent skills, and source metadata remain unchanged. An invalid role returns `400`; an unknown project returns `404`; disabled endpoint wiring returns `404`. A missing or stale notice, unsupported provider, malformed or destructive response, provider execution failure, or concurrent route change is rejected. Every failure leaves the preset instructions and stored bundled revision unchanged. A successful response is the updated `AgentPresetRecord` and advances the selected preset's role revision even if its preserved markdown does not equal the current bundle.

## Quicksprint templates

Expand Down
4 changes: 2 additions & 2 deletions docs-web/content/docs/user-dashboard-agents.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,9 @@ When a selected built-in has not diverged from its tracked baseline, a newer bun

The Agents page heading is **Planning agent base update available** or **Project manager base update available**. It explains whether the named preset has customized instructions or is assigned to that route, followed by: **Updating invokes an agent to compare both base files and apply only important system-compatibility instructions. Your main prompt, custom instructions, and behavior are preserved.** No merge runs until you choose **Update with AI**.

To apply a notice, the dashboard uses `POST /api/projects/:projectId/agent-presets/base-updates/:baseAgentRole/apply`, where the role must be `planning_agent` or `project_manager`. The endpoint consumes no request body and runs through the configured supported local planning provider. The agent compares the previous base, current bundle, and selected preset, and may add only compatibility-critical system instructions such as changed MCP or strict output-schema requirements. Code UX tolerates harmless presentation text, markdown fences, and supported provider response envelopes, but the extracted payload must still be a JSON object containing exactly one non-empty `instructionMarkdown` string and no other properties. It verifies that all original preset lines remain in order, rechecks that routing still selects the noticed preset, and writes the markdown itself only after parsing and safety checks succeed.
To apply a notice, the dashboard uses `POST /api/projects/:projectId/agent-presets/base-updates/:baseAgentRole/apply`, where the role must be `planning_agent` or `project_manager`. The endpoint consumes no request body, uses the configured supported local provider selected by the `planning` invocation route, and records execution type `agent_base_update`. The agent compares the previous base, current bundle, and selected preset, and may add only compatibility-critical system instructions such as changed MCP or strict output-schema requirements. Although the prompt requests raw JSON only, Code UX tolerates supported presentation noise such as surrounding text, markdown fences, and provider response envelopes. The extracted payload must still be a non-array JSON object containing exactly one non-empty `instructionMarkdown` string and no other properties. Extraction, payload-shape, and line-preservation errors receive a structured corrective retry in the same provider session. Code UX verifies that all original preset lines remain in order, rechecks that routing still selects the noticed preset, and writes the markdown itself only after parsing and safety checks succeed.

The merge cannot change the main prompt, custom behavior, avatar, labels, routing, provider/model, memory, MCP access, persistent skills, or source metadata. A failed provider call, unsupported provider, malformed or destructive response, stale notice, or route change leaves both the preset and its stored bundled revision unchanged, so the notice remains available for retry. A successful merge records the current bundled revision even when the preserved custom markdown differs from the bundle, preventing the same notice from returning.
The merge cannot change the main prompt, custom behavior, avatar, labels, routing, provider/model, memory, MCP access, persistent skills, or source metadata. A provider failure, unsupported provider, malformed or destructive response, missing or stale notice, or route change leaves both the preset instructions and its stored bundled revision unchanged, so the notice remains available for retry. A successful merge records the current bundled revision even when the preserved custom markdown differs from the bundle, preventing the same notice from returning.

## Deleting an agent

Expand Down
4 changes: 2 additions & 2 deletions docs-web/developer/http-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,9 +171,9 @@ This page lists every endpoint, grouped by domain. Path parameters use `:name` n

The GET response is an array of notices with `projectId`, `role`, `baseAgentPresetId`, `selectedAgentPresetId`, `selectedAgentName`, `reason`, `currentRevision`, and `availableRevision`. `reason` is `customized_instructions` or `alternate_route`. Planning and Project manager targets are resolved independently from `agents.routing.planning.agentPresetId` and `agents.routing.dashboardReply.agentPresetId`, using their named built-ins when the route value is null. Worker, Quality assurance agent, and Project Setup Agent are outside this contract.

POST requires a current notice and a supported local provider resolved through the `planning` invocation route. It records `agent_base_update` telemetry, sends the previous base, current bundle, and selected preset to the provider, and accepts exactly one raw JSON object containing one non-empty string property, `instructionMarkdown`. The validated result must retain every original selected-preset line in order. Immediately before writing, the service verifies that the selected routed preset still matches the notice.
POST requires a current notice and a supported local provider resolved through the `planning` invocation route. It records execution invocation type `agent_base_update` and sends the previous base, current bundle, and selected preset to the provider. The provider prompt requests raw JSON only, but the server parser tolerates supported presentation noise such as surrounding text, markdown fences, and provider response envelopes. After extraction, the payload must be a non-array JSON object containing exactly one non-empty string property, `instructionMarkdown`, and no other properties. Extraction, payload-shape, and line-preservation errors continue through the structured corrective retry path in the same provider session. The validated result must retain every original selected-preset line in order. Immediately before writing, the service verifies that the selected routed preset still matches the notice.

Only instruction markdown is writable, and only compatibility-critical system additions are requested. The main prompt, custom behavior, avatar, labels, routing, provider/model, memory, MCP access, persistent skills, and source metadata remain unchanged. An invalid role returns `400`; an unknown project returns `404`; disabled endpoint wiring returns `404`. A missing or stale notice, unsupported provider, invalid response, or concurrent route change is rejected, while provider execution failures propagate as request errors. All failures occur before the preset write and bundled-revision advance. A successful response is the updated `AgentPresetRecord` and advances the selected preset's role revision even if its preserved markdown does not equal the current bundle.
Only instruction markdown is writable, and only compatibility-critical system additions are requested. The main prompt, custom behavior, avatar, labels, routing, provider/model, memory, MCP access, persistent skills, and source metadata remain unchanged. An invalid role returns `400`; an unknown project returns `404`; disabled endpoint wiring returns `404`. A missing or stale notice, unsupported provider, malformed or destructive response, provider execution failure, or concurrent route change is rejected. Every failure leaves the preset instructions and stored bundled revision unchanged. A successful response is the updated `AgentPresetRecord` and advances the selected preset's role revision even if its preserved markdown does not equal the current bundle.

## Quicksprint templates

Expand Down
4 changes: 2 additions & 2 deletions docs-web/user/dashboard/agents.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,9 @@ When a selected built-in has not diverged from its tracked baseline, a newer bun

The Agents page heading is **Planning agent base update available** or **Project manager base update available**. It explains whether the named preset has customized instructions or is assigned to that route, followed by: **Updating invokes an agent to compare both base files and apply only important system-compatibility instructions. Your main prompt, custom instructions, and behavior are preserved.** No merge runs until you choose **Update with AI**.

To apply a notice, the dashboard uses `POST /api/projects/:projectId/agent-presets/base-updates/:baseAgentRole/apply`, where the role must be `planning_agent` or `project_manager`. The endpoint consumes no request body and runs through the configured supported local planning provider. The agent compares the previous base, current bundle, and selected preset, and may add only compatibility-critical system instructions such as changed MCP or strict output-schema requirements. Code UX tolerates harmless presentation text, markdown fences, and supported provider response envelopes, but the extracted payload must still be a JSON object containing exactly one non-empty `instructionMarkdown` string and no other properties. It verifies that all original preset lines remain in order, rechecks that routing still selects the noticed preset, and writes the markdown itself only after parsing and safety checks succeed.
To apply a notice, the dashboard uses `POST /api/projects/:projectId/agent-presets/base-updates/:baseAgentRole/apply`, where the role must be `planning_agent` or `project_manager`. The endpoint consumes no request body, uses the configured supported local provider selected by the `planning` invocation route, and records execution type `agent_base_update`. The agent compares the previous base, current bundle, and selected preset, and may add only compatibility-critical system instructions such as changed MCP or strict output-schema requirements. Although the prompt requests raw JSON only, Code UX tolerates supported presentation noise such as surrounding text, markdown fences, and provider response envelopes. The extracted payload must still be a non-array JSON object containing exactly one non-empty `instructionMarkdown` string and no other properties. Extraction, payload-shape, and line-preservation errors receive a structured corrective retry in the same provider session. Code UX verifies that all original preset lines remain in order, rechecks that routing still selects the noticed preset, and writes the markdown itself only after parsing and safety checks succeed.

The merge cannot change the main prompt, custom behavior, avatar, labels, routing, provider/model, memory, MCP access, persistent skills, or source metadata. A failed provider call, unsupported provider, malformed or destructive response, stale notice, or route change leaves both the preset and its stored bundled revision unchanged, so the notice remains available for retry. A successful merge records the current bundled revision even when the preserved custom markdown differs from the bundle, preventing the same notice from returning.
The merge cannot change the main prompt, custom behavior, avatar, labels, routing, provider/model, memory, MCP access, persistent skills, or source metadata. A provider failure, unsupported provider, malformed or destructive response, missing or stale notice, or route change leaves both the preset instructions and its stored bundled revision unchanged, so the notice remains available for retry. A successful merge records the current bundled revision even when the preserved custom markdown differs from the bundle, preventing the same notice from returning.

## Deleting an agent

Expand Down
2 changes: 1 addition & 1 deletion docs/architecture/agent-preset-foundation.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ Dashboard endpoints:

Base-agent updates are limited to `planning_agent` and `project_manager`. The notice endpoint performs no provider work; it reports only changed bundled baselines that cannot be applied automatically because the selected preset has custom instructions or the role is routed to an alternate preset.

Applying a notice uses the existing `planning` virtual-provider route and structured invocation pipeline, recorded as execution invocation type `agent_base_update`. The provider receives the previous bundled/base instructions, current bundled instructions, and the selected preset instructions, but is restricted to returning one JSON property: `instructionMarkdown`. The parser tolerates presentation text, markdown fences, and the shared extractor's supported provider envelopes, then still requires the extracted payload to be a non-array object with exactly one non-empty string property named `instructionMarkdown`. Its prompt permits only compatibility-critical additions, such as changed MCP or JSON-schema rules, and forbids workspace writes or metadata changes. Code UX verifies the original preset remains line-for-line and in order before applying only instruction markdown through `AgentPresetSyncService`; avatar, labels, routing, provider/model, memory, MCP access, persistent skills, and source metadata remain unchanged. Extraction, payload validation, and preservation checks all complete before persistence. The stored bundled revision advances only after provider execution and parsing succeed, and the selected preset ID is checked again immediately before application to prevent a concurrent route change from redirecting the result.
Applying a notice uses the existing `planning` virtual-provider route and structured invocation pipeline, recorded as execution invocation type `agent_base_update`. The provider receives the previous bundled/base instructions, current bundled instructions, and the selected preset instructions, but is restricted to returning one JSON property: `instructionMarkdown`. Although the prompt requests raw JSON only, the server parser tolerates supported presentation noise such as surrounding text, markdown fences, and the shared extractor's provider envelopes. After extraction, the payload must still be a non-array object with exactly one non-empty string property named `instructionMarkdown`. Extraction, payload-shape, and line-preservation errors continue through the structured corrective retry path in the same provider session. The merge prompt permits only compatibility-critical additions, such as changed MCP or JSON-schema rules, and forbids workspace writes or metadata changes. Code UX verifies the original preset remains line-for-line and in order before applying only instruction markdown through `AgentPresetSyncService`; avatar, labels, routing, provider/model, memory, MCP access, persistent skills, and source metadata remain unchanged. All parsing and preservation checks complete before persistence, and the selected preset ID is checked again immediately before application to prevent a concurrent route change from redirecting the result. Malformed or destructive output, a missing or stale notice, an unsupported provider, a provider failure, or a concurrent route change leaves both the preset instructions and stored bundled revision unchanged. The revision advances only after provider execution, parsing, safety validation, and application succeed.

These endpoints are project-scoped and intentionally separate from:

Expand Down
Loading
Loading