Skip to content

Commit 322c366

Browse files
committed
feat: enhance run profile management with presets and UI integration
1 parent 9f1b5bf commit 322c366

6 files changed

Lines changed: 176 additions & 21 deletions

File tree

README.md

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,23 +18,29 @@ Sessions are persistent. You can continue the same session with an additional re
1818

1919
## Pipeline
2020

21-
Default 12-step flow — each step can be toggled, reassigned to a different model, or given a custom skill file:
21+
Default pipeline — each step can be toggled, reassigned to a different model, or given a custom skill file:
2222

2323
| # | Step | Default model |
2424
|---|---|---|
2525
| 1 | 📋 Refine Specification | claude-sonnet-4-6 |
2626
| 2 | 🏛 Architecture Breakdown | claude-sonnet-4-6 |
27-
| 3 | 🗺 Development Plan | claude-sonnet-4-6 |
27+
| 3 | 🗺 Development Plan _(full profile)_ | claude-sonnet-4-6 |
2828
| 4 | 🧭 Formal Pre-Check | gpt-5.4 |
2929
| 5 | 🛠 Implement | claude-sonnet-4-6 |
3030
| 6 | 🔍 Technical Review | gpt-5.4 |
3131
| 7 | 🧯 Fix Findings _(runs only if issues found)_ | claude-sonnet-4-6 |
32-
| 8 | 🧪 Tests & Verification | claude-sonnet-4-6 |
33-
| 9 | 🔒 Security Review | gpt-5.4 |
34-
| 10 | 📚 Documentation | gpt-5.4-mini |
35-
| 11 | 💥 Runtime Hard Check _(optional, disabled by default)_ | claude-sonnet-4-6 |
32+
| 8 | 🧪 Tests & Verification _(full profile)_ | claude-sonnet-4-6 |
33+
| 9 | 🔒 Security Review _(full profile)_ | gpt-5.4 |
34+
| 10 | 📚 Documentation _(full profile)_ | gpt-5.4-mini |
35+
| 11 | 💥 Runtime Hard Check _(full profile / optional)_ | claude-sonnet-4-6 |
3636
| 12 | ✅ Final Report | gpt-5.4-mini |
3737

38+
Recommended run profiles:
39+
40+
- `lite``spec`, `implement`, `review`, `fix`, `final-report`
41+
- `standard``spec`, `architecture`, `formal-precheck`, `implement`, `review`, `fix`, `final-report`
42+
- `full` — enables every step, including planning, test/security/docs, and hard-check
43+
3844
## Token strategy
3945

4046
- Step outputs are structured JSON — compact and machine-parseable
@@ -103,6 +109,8 @@ The new `🧭 Formal Pre-Check` step runs before implementation and is meant to
103109
- logic gaps and sequencing errors
104110
- structural coupling that would make implementation brittle
105111

112+
For UI-heavy tasks, prefer assigning the optional skill [ui-direction.md](/Users/ddurzo/Development/misc/agentic-flow/skills/ui-direction.md) to `architecture` or `formal-precheck` instead of adding a permanent extra step to every run.
113+
106114
Current auto-detection order:
107115

108116
- existing `docker-compose.yml` / `compose.yaml`

skills/ui-direction.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Role: UI Direction Lead
2+
3+
Define the visual and interaction direction before frontend implementation starts.
4+
5+
## Output
6+
7+
1. **Visual intent** — the design mood, hierarchy, and clarity goals
8+
2. **Core interaction rules** — navigation, affordances, loading/error/empty states
9+
3. **Accessibility guardrails** — contrast, keyboard flow, semantics, focus visibility
10+
4. **Responsive guardrails** — what must remain stable across desktop and mobile
11+
5. **Implementation guardrails** — the constraints the coding step must preserve
12+
13+
## Rules
14+
15+
- Do not produce code.
16+
- Do not redesign the product unless the task explicitly asks for it.
17+
- If an existing design system or product language exists, stay within it.
18+
- If no visual direction exists, define one clearly and simply; avoid generic UI filler.
19+
- Focus on decisions that reduce ambiguity during implementation.
20+
- Call out UX contradictions, unclear flows, or states that are missing from the current plan.
21+
22+
Finish with the `agenticflow` JSON block.

src/configManager.ts

Lines changed: 39 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import * as vscode from 'vscode';
55
import * as fs from 'fs';
66
import * as path from 'path';
7-
import type { AgenticFlowConfig, SessionState, StepConfig } from './types';
7+
import type { AgenticFlowConfig, RunProfileId, SessionState, StepConfig } from './types';
88

99
const DEFAULT_STORAGE_DIR = '.agentic-flow';
1010
const CONFIG_BASENAME = 'config.json';
@@ -13,6 +13,24 @@ const SESSION_BASENAME = 'session.json';
1313
const RUNTIME_ENV_BASENAME = 'runtime.env';
1414
const SKILLS_DIRNAME = 'skills';
1515

16+
export const RUN_PROFILE_PRESETS: Record<Exclude<RunProfileId, 'custom'>, { label: string; description: string; enabledStepIds: string[] }> = {
17+
lite: {
18+
label: 'Lite',
19+
description: 'Fastest practical flow for small or iterative changes.',
20+
enabledStepIds: ['spec', 'implement', 'review', 'fix', 'final-report'],
21+
},
22+
standard: {
23+
label: 'Standard',
24+
description: 'Balanced flow with architecture and formal pre-check before coding.',
25+
enabledStepIds: ['spec', 'architecture', 'formal-precheck', 'implement', 'review', 'fix', 'final-report'],
26+
},
27+
full: {
28+
label: 'Full',
29+
description: 'Extended flow with planning, testing, security, docs and runtime verification.',
30+
enabledStepIds: ['spec', 'architecture', 'implementation-plan', 'formal-precheck', 'implement', 'review', 'fix', 'test', 'security', 'docs', 'hard-check', 'final-report'],
31+
},
32+
};
33+
1634
const DEFAULT_STEPS: StepConfig[] = [
1735
{
1836
id: 'spec',
@@ -37,7 +55,7 @@ const DEFAULT_STEPS: StepConfig[] = [
3755
{
3856
id: 'implementation-plan',
3957
name: '🗺 Development Plan',
40-
enabled: true,
58+
enabled: false,
4159
model: 'claude-sonnet-4-6',
4260
skill: '.agentic-flow/skills/implementation-plan.md',
4361
contextMode: 'summary',
@@ -88,7 +106,7 @@ const DEFAULT_STEPS: StepConfig[] = [
88106
{
89107
id: 'test',
90108
name: '🧪 Tests & Verification',
91-
enabled: true,
109+
enabled: false,
92110
model: 'claude-sonnet-4-6',
93111
skill: '.agentic-flow/skills/testing.md',
94112
contextMode: 'summary',
@@ -98,7 +116,7 @@ const DEFAULT_STEPS: StepConfig[] = [
98116
{
99117
id: 'security',
100118
name: '🔒 Security Review',
101-
enabled: true,
119+
enabled: false,
102120
model: 'gpt-5.4',
103121
skill: '.agentic-flow/skills/security.md',
104122
contextMode: 'summary',
@@ -108,7 +126,7 @@ const DEFAULT_STEPS: StepConfig[] = [
108126
{
109127
id: 'docs',
110128
name: '📚 Documentation',
111-
enabled: true,
129+
enabled: false,
112130
model: 'gpt-5.4-mini',
113131
skill: '.agentic-flow/skills/docs.md',
114132
contextMode: 'summary',
@@ -145,6 +163,7 @@ const DEFAULT_STEPS: StepConfig[] = [
145163

146164
export const DEFAULT_CONFIG: AgenticFlowConfig = {
147165
version: '2.0',
166+
runProfile: 'standard',
148167
steps: DEFAULT_STEPS,
149168
stateFile: path.join(DEFAULT_STORAGE_DIR, STATE_BASENAME),
150169
sessionFile: path.join(DEFAULT_STORAGE_DIR, SESSION_BASENAME),
@@ -195,6 +214,7 @@ export function loadConfig(): AgenticFlowConfig {
195214
return {
196215
...DEFAULT_CONFIG,
197216
...parsed,
217+
runProfile: normalizeRunProfile(parsed.runProfile),
198218
steps: mergeSteps(parsed.steps),
199219
runtime: {
200220
...DEFAULT_CONFIG.runtime,
@@ -234,12 +254,25 @@ function mergeSteps(parsedSteps?: StepConfig[]): StepConfig[] {
234254
return merged;
235255
}
236256

257+
export function normalizeRunProfile(profile?: string): RunProfileId {
258+
return profile === 'lite' || profile === 'standard' || profile === 'full' || profile === 'custom'
259+
? profile
260+
: 'standard';
261+
}
262+
263+
export function applyRunProfileToSteps(steps: StepConfig[], profile: RunProfileId): StepConfig[] {
264+
if (profile === 'custom') return structuredClone(steps);
265+
const preset = RUN_PROFILE_PRESETS[profile];
266+
const enabled = new Set(preset.enabledStepIds);
267+
return steps.map(step => ({ ...step, enabled: enabled.has(step.id) }));
268+
}
269+
237270
export function saveConfig(config: AgenticFlowConfig): void {
238271
const dir = getAgenticFlowDir();
239272
if (!dir) throw new Error('No workspace open');
240273
if (!fs.existsSync(dir)) fs.mkdirSync(dir, { recursive: true });
241274
const p = path.join(dir, CONFIG_BASENAME);
242-
fs.writeFileSync(p, JSON.stringify(config, null, 2), 'utf8');
275+
fs.writeFileSync(p, JSON.stringify({ ...config, runProfile: normalizeRunProfile(config.runProfile) }, null, 2), 'utf8');
243276
}
244277

245278
export async function initWorkspace(defaultModel?: string): Promise<void> {

src/types.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ export type RunMode = 'new' | 'continue';
88
export type StepRunCondition = 'always' | 'ifIssues';
99
export type StepResultStatus = 'ok' | 'issues' | 'blocked';
1010
export type StepExecutor = 'model' | 'hard-check';
11+
export type RunProfileId = 'lite' | 'standard' | 'full' | 'custom';
1112
export type ModelSource = 'cli' | 'api' | 'vscode';
1213
export type TokenAccounting = 'estimated' | 'reported';
1314
export type ApiProviderId = 'openai' | 'anthropic' | 'xai' | 'openrouter' | 'ollama';
@@ -103,6 +104,7 @@ export interface HardCheckConfig {
103104

104105
export interface AgenticFlowConfig {
105106
version: string;
107+
runProfile?: RunProfileId;
106108
steps: StepConfig[];
107109
stateFile?: string;
108110
sessionFile?: string;

0 commit comments

Comments
 (0)