Skip to content

Commit a5fd5bf

Browse files
committed
added workflow permissions
1 parent f76021c commit a5fd5bf

19 files changed

+5383
-0
lines changed

sdd/specs/granular-permission-system.spec.md

Lines changed: 415 additions & 0 deletions
Large diffs are not rendered by default.

sdd/specs/pulumi-toolkit-deployment.spec.md

Lines changed: 486 additions & 0 deletions
Large diffs are not rendered by default.

sdd/tasks/.index.json

Lines changed: 785 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 169 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,169 @@
1+
# TASK-049: WebSearchAgent Config Svelte Component
2+
3+
**Feature**: WebSearchAgent Support in CrewBuilder
4+
**Spec**: `sdd/specs/crew-websearchagent-support.spec.md`
5+
**Status**: pending
6+
**Priority**: high
7+
**Estimated effort**: M (2-4h)
8+
**Depends-on**: none
9+
**Assigned-to**: unassigned
10+
11+
---
12+
13+
## Context
14+
15+
> This task implements Module 1 from the spec: the WebSearchAgent-specific configuration panel in the CrewBuilder UI.
16+
17+
When users add a `WebSearchAgent` to their crew in the visual designer, they currently see only the generic agent config. This task creates a specialized configuration component that exposes WebSearchAgent's unique parameters.
18+
19+
**Repository**: `navigator-frontend-next` (NOT ai-parrot)
20+
21+
---
22+
23+
## Scope
24+
25+
- Create `WebSearchAgentConfig.svelte` component
26+
- Implement temperature slider (default: 0.0, range: 0.0-1.0)
27+
- Implement "Enable Contrastive Search" checkbox
28+
- When checked: show textarea for `contrastive_prompt`
29+
- Show placeholder hint: "Use $query and $search_results in prompts"
30+
- Implement "Enable Synthesis" checkbox
31+
- When checked: show textarea for `synthesize_prompt`
32+
- Show placeholder hint: "Use $query and $search_results in prompts"
33+
- Show default prompt examples for reference (per open question decision)
34+
- Add warning if temperature > 0.3 ("Higher temperature may cause hallucinations in search results")
35+
36+
**NOT in scope**:
37+
- Agent type detection logic (TASK-050)
38+
- JSON serialization to store (TASK-051)
39+
- Backend validation (TASK-052)
40+
41+
---
42+
43+
## Files to Create / Modify
44+
45+
| File | Action | Description |
46+
|---|---|---|
47+
| `src/lib/components/crew-builder/WebSearchAgentConfig.svelte` | CREATE | Main configuration component |
48+
| `src/lib/components/crew-builder/index.ts` | MODIFY | Export the new component |
49+
50+
---
51+
52+
## Implementation Notes
53+
54+
### Pattern to Follow
55+
56+
Follow the existing pattern in the CrewBuilder for agent configuration panels. Look at how other specialized agents (if any) handle their config.
57+
58+
```svelte
59+
<script lang="ts">
60+
export let agentConfig: AgentDefinition;
61+
62+
// Reactive bindings to agentConfig.config
63+
$: temperature = agentConfig.config.temperature ?? 0.0;
64+
$: contrastiveSearch = agentConfig.config.contrastive_search ?? false;
65+
$: contrastivePrompt = agentConfig.config.contrastive_prompt ?? '';
66+
$: synthesize = agentConfig.config.synthesize ?? false;
67+
$: synthesizePrompt = agentConfig.config.synthesize_prompt ?? '';
68+
</script>
69+
```
70+
71+
### Key Constraints
72+
73+
- Use two-way binding to update `agentConfig.config` in real-time
74+
- Temperature defaults to 0.0 (NOT the usual 0.7) to avoid hallucination
75+
- Textareas for prompts should only be visible when corresponding checkbox is checked
76+
- Show default prompt examples inline for user reference
77+
78+
### Default Prompts for Reference
79+
80+
Contrastive:
81+
```
82+
Based on following query: $query
83+
Below are search results about its COMPETITORS. Analyze ONLY the competitors:
84+
85+
$search_results
86+
87+
Structure your response as:
88+
**Market Category**: [category]
89+
**Competitors Found**: ...
90+
```
91+
92+
Synthesis:
93+
```
94+
Based on the following query: $query
95+
Analyze and synthesize the following search results into a comprehensive summary:
96+
97+
$search_results
98+
99+
Provide:
100+
- **Key Findings**: Main insights from the results
101+
- **Analysis**: Critical evaluation of the information
102+
- **Summary**: Concise synthesis of all findings
103+
```
104+
105+
---
106+
107+
## Acceptance Criteria
108+
109+
- [ ] Component renders temperature slider with default 0.0
110+
- [ ] Component renders "Enable Contrastive Search" checkbox
111+
- [ ] Contrastive prompt textarea appears only when checkbox is checked
112+
- [ ] Component renders "Enable Synthesis" checkbox
113+
- [ ] Synthesis prompt textarea appears only when checkbox is checked
114+
- [ ] Default prompts shown for reference
115+
- [ ] Warning shown when temperature > 0.3
116+
- [ ] Two-way binding works: changes update agentConfig.config
117+
- [ ] Component exported from index.ts
118+
119+
---
120+
121+
## Test Specification
122+
123+
```typescript
124+
// Tests would be in the frontend repo
125+
describe('WebSearchAgentConfig', () => {
126+
it('renders with default temperature 0.0', () => {
127+
// ...
128+
});
129+
130+
it('shows contrastive prompt textarea when checkbox checked', () => {
131+
// ...
132+
});
133+
134+
it('shows synthesis prompt textarea when checkbox checked', () => {
135+
// ...
136+
});
137+
138+
it('shows warning when temperature > 0.3', () => {
139+
// ...
140+
});
141+
});
142+
```
143+
144+
---
145+
146+
## Agent Instructions
147+
148+
When you pick up this task:
149+
150+
1. **Read the spec** at the path listed above for full context
151+
2. **Check dependencies** — verify `Depends-on` tasks are in `tasks/completed/`
152+
3. **Update status** in `tasks/.index.json``"in-progress"` with your session ID
153+
4. **Implement** following the scope and notes above
154+
5. **Verify** all acceptance criteria are met
155+
6. **Move this file** to `tasks/completed/TASK-049-websearchagent-config-component.md`
156+
7. **Update index**`"done"`
157+
8. **Fill in the Completion Note** below
158+
159+
---
160+
161+
## Completion Note
162+
163+
*(Agent fills this in when done)*
164+
165+
**Completed by**:
166+
**Date**:
167+
**Notes**:
168+
169+
**Deviations from spec**: none | describe if any
Lines changed: 140 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,140 @@
1+
# TASK-050: Agent Type Detection in Config Panel
2+
3+
**Feature**: WebSearchAgent Support in CrewBuilder
4+
**Spec**: `sdd/specs/crew-websearchagent-support.spec.md`
5+
**Status**: pending
6+
**Priority**: high
7+
**Estimated effort**: S (< 2h)
8+
**Depends-on**: TASK-049
9+
**Assigned-to**: unassigned
10+
11+
---
12+
13+
## Context
14+
15+
> This task implements Module 2 from the spec: detecting when a WebSearchAgent is selected and rendering the appropriate configuration component.
16+
17+
The CrewBuilder needs to recognize when the selected agent is a `WebSearchAgent` and dynamically render the specialized `WebSearchAgentConfig` component instead of the generic agent config panel.
18+
19+
**Repository**: `navigator-frontend-next` (NOT ai-parrot)
20+
21+
---
22+
23+
## Scope
24+
25+
- Modify `AgentConfigPanel.svelte` to detect `agent_class === "WebSearchAgent"`
26+
- Conditionally render `WebSearchAgentConfig` component when WebSearchAgent is selected
27+
- Fall back to generic agent config for all other agent types
28+
- Ensure smooth transition when switching between agent types in the flow designer
29+
30+
**NOT in scope**:
31+
- The WebSearchAgentConfig component itself (TASK-049)
32+
- JSON serialization logic (TASK-051)
33+
- Other agent-specific config panels
34+
35+
---
36+
37+
## Files to Create / Modify
38+
39+
| File | Action | Description |
40+
|---|---|---|
41+
| `src/lib/components/crew-builder/AgentConfigPanel.svelte` | MODIFY | Add agent type detection and conditional rendering |
42+
43+
---
44+
45+
## Implementation Notes
46+
47+
### Pattern to Follow
48+
49+
```svelte
50+
<script lang="ts">
51+
import WebSearchAgentConfig from './WebSearchAgentConfig.svelte';
52+
import GenericAgentConfig from './GenericAgentConfig.svelte';
53+
54+
export let selectedAgent: AgentDefinition | null;
55+
56+
$: isWebSearchAgent = selectedAgent?.agent_class === 'WebSearchAgent';
57+
</script>
58+
59+
{#if selectedAgent}
60+
{#if isWebSearchAgent}
61+
<WebSearchAgentConfig agentConfig={selectedAgent} />
62+
{:else}
63+
<GenericAgentConfig agentConfig={selectedAgent} />
64+
{/if}
65+
{/if}
66+
```
67+
68+
### Key Constraints
69+
70+
- Detection must be case-sensitive: `"WebSearchAgent"` exactly
71+
- Generic config fields (name, system_prompt, etc.) should still render alongside specialized config
72+
- The component must handle null/undefined selectedAgent gracefully
73+
74+
### Agent Classes to Support
75+
76+
Currently known agent classes that might appear:
77+
- `BaseAgent` / `Agent` — generic
78+
- `Chatbot` — generic
79+
- `WebSearchAgent` — specialized (this task)
80+
81+
Future agent classes can follow this pattern.
82+
83+
---
84+
85+
## Acceptance Criteria
86+
87+
- [ ] `AgentConfigPanel` detects `agent_class === "WebSearchAgent"`
88+
- [ ] `WebSearchAgentConfig` component renders when WebSearchAgent selected
89+
- [ ] Generic config renders for non-WebSearchAgent types
90+
- [ ] No errors when `selectedAgent` is null
91+
- [ ] Switching agents in the designer updates the config panel correctly
92+
93+
---
94+
95+
## Test Specification
96+
97+
```typescript
98+
describe('AgentConfigPanel', () => {
99+
it('renders WebSearchAgentConfig for WebSearchAgent', () => {
100+
const agent = { agent_class: 'WebSearchAgent', config: {} };
101+
// render and expect WebSearchAgentConfig to be present
102+
});
103+
104+
it('renders generic config for BaseAgent', () => {
105+
const agent = { agent_class: 'BaseAgent', config: {} };
106+
// render and expect GenericAgentConfig to be present
107+
});
108+
109+
it('handles null selectedAgent gracefully', () => {
110+
// render with null, expect no errors
111+
});
112+
});
113+
```
114+
115+
---
116+
117+
## Agent Instructions
118+
119+
When you pick up this task:
120+
121+
1. **Read the spec** at the path listed above for full context
122+
2. **Check dependencies** — verify `Depends-on` tasks are in `tasks/completed/`
123+
3. **Update status** in `tasks/.index.json``"in-progress"` with your session ID
124+
4. **Implement** following the scope and notes above
125+
5. **Verify** all acceptance criteria are met
126+
6. **Move this file** to `tasks/completed/TASK-050-agent-type-detection.md`
127+
7. **Update index**`"done"`
128+
8. **Fill in the Completion Note** below
129+
130+
---
131+
132+
## Completion Note
133+
134+
*(Agent fills this in when done)*
135+
136+
**Completed by**:
137+
**Date**:
138+
**Notes**:
139+
140+
**Deviations from spec**: none | describe if any

0 commit comments

Comments
 (0)