@@ -340,6 +340,8 @@ Resolution order: explicit `@skill:name` refs → agent-targeted → global →
340340| ` run <query> ` | Full pipeline run |
341341| ` chat ` | Interactive REPL |
342342| ` studio ` | Launch Studio UI + API |
343+ | ` studio --kill ` | Force-kill existing studio on port |
344+ | ` studio --port-auto ` | Auto-switch to next free port |
343345| ` status ` | Query/plan/board snapshot |
344346| ` board ` | Live kanban board |
345347| ` config show ` | Print effective config |
@@ -349,6 +351,10 @@ Resolution order: explicit `@skill:name` refs → agent-targeted → global →
349351| ` agent list ` | List agents with effective LLM |
350352| ` agent show <id> ` | Show agent detail |
351353| ` agent edit <id> model=… ` | Patch agent fields |
354+ | ` blocks list ` | List all building blocks |
355+ | ` blocks show <kind> <id> ` | Show block detail |
356+ | ` blocks validate ` | Validate all block YAML |
357+ | ` blocks apply <pack-id> ` | Apply a language pack |
352358| ` skills list ` | List skills |
353359| ` skills new <name> ` | Create a skill |
354360| ` doctor ` | System health check |
@@ -414,3 +420,101 @@ make build && make test && make install
4144206 . ** New CLI command** : Add Cobra command in ` cmd/slmcode/ ` → register in ` root.go `
4154217 . ** New config field** : Add to ` config.Config ` struct → handle in ` ApplyPatch() ` → add YAML/JSON tags
416422
423+ ---
424+
425+ ## 12. Parallel Execution Architecture (v0.12.0+)
426+
427+ slmcode maximizes throughput via 6 parallel execution paths, all bounded by ` max_parallel ` (default 4):
428+
429+ ### 12.1 Parallel Execution Paths
430+
431+ | Path | Location | What Runs in Parallel |
432+ | ------| ----------| ----------------------|
433+ | ** Worker execution** | ` loop/runner.go:runWave ` | All tasks in a wave via GoLangGraph ` ExecuteSubAgents ` |
434+ | ** Post-worker QA** | ` loop/runner.go:runPostWorkerQAParallel ` | Smoke, acceptance smoke, static quality, claims gate — across all tasks |
435+ | ** Self-critique** | ` loop/runner.go:runSelfCritiqueParallel ` | Corrector LLM for all weak tasks simultaneously |
436+ | ** Review wave** | ` loop/runner.go:reviewWave ` | Reviewer+corrector for independent tasks (no shared files) |
437+ | ** Phase parallelism** | ` orchestrator/parallel.go:runPhaseParallel ` | context+explore in parallel, architect+clarify in parallel |
438+ | ** Speculative races** | ` loop/runner.go:speculate ` + ` orchestrator/speculate.go ` | Disk-accept vs reviewer LLM, multiple tester strategies |
439+
440+ ### 12.2 Config Fields
441+
442+ ``` yaml
443+ # .slmcode/config.yaml
444+ max_parallel : 4 # Max concurrent tasks per wave (default: 4)
445+ think_passes : 1 # Multi-pass thinking (2+ enables speculative digs)
446+ task_timeout : 12m # Per-task timeout
447+ max_retries : 4 # Review/correct retries before escalate
448+ ` ` `
449+
450+ ### 12.3 Task Independence
451+
452+ Tasks are grouped by shared files for parallel review — tasks without overlapping files run concurrently. The ` scheduleReady` function prioritizes:
453+ 1. Explorers/docs first (discovery)
454+ 2. Workers with files (focused)
455+ 3. Testers last (post-implementation)
456+
457+ # ## 12.4 Wave-Level Fast-Path
458+
459+ When ALL tasks in a wave have clean QA + disk evidence, the entire reviewer LLM phase is skipped — all tasks go directly to Done.
460+
461+ ---
462+
463+ # # 13. HITL (Human-in-the-Loop) Configuration
464+
465+ # ## 13.1 HITL Modes
466+
467+ | Setting | Values | Default | Purpose |
468+ |---------|--------|---------|---------|
469+ | `plan_approve` | `off` \| `auto` \| `ask` | `ask` | Human must approve plan before execute |
470+ | `clarify_mode` | `off` \| `auto` \| `ask` | `ask` | Interview agent asks about language/stack |
471+ | `continue_ask` | `off` \| `auto` \| `ask` | `ask` | Ask when retries/QA exhausted |
472+ | `escalate_ask` | `off` \| `auto` \| `ask` | `ask` | Ask on max-retry escalate |
473+ | `auto_approve` | `true` \| `false` | `false` | Global override — skip all HITL gates |
474+
475+ # ## 13.2 Pack-Level HITL Control
476+
477+ ` ` ` yaml
478+ spec:
479+ defer_plan_approve: true # Force plan_approve=ask
480+ defer_clarify: true # Force clarify_mode=ask
481+ ` ` `
482+
483+ # ## 13.3 HITL Endpoints
484+
485+ The Studio frontend polls these endpoints every 2s :
486+ - ` GET /api/clarify/pending` → `POST /api/clarify/answer`
487+ - ` GET /api/plan/pending` → `POST /api/plan/approve`
488+ - ` GET /api/continue/pending` → `POST /api/continue/answer`
489+ - ` GET /api/escalate/pending` → `POST /api/escalate/answer`
490+ - ` GET /api/shell/pending` → `POST /api/shell/approve`
491+
492+ Each ask has a timeout; on expiry the recommended/default action is applied.
493+
494+ ---
495+
496+ # # 14. File Browser API
497+
498+ # ## 14.1 Endpoints
499+
500+ - ` GET /api/workspace/tree?path=` — list directory contents (dirs first, no hidden files)
501+ - ` GET /api/workspace/file?path=` — read file content with syntax highlighting
502+
503+ # ## 14.2 Studio File Browser
504+
505+ The `/files` page shows a full recursive directory tree. Features :
506+ - Expand/collapse folders with lazy loading
507+ - Toggle between "All files" and "Modified only" (agent-changed)
508+ - Per-line inline comments that can be sent as tasks
509+ - Syntax highlighting for Go, Python, TypeScript, Rust, and more
510+
511+ ---
512+
513+ # # 15. Version History
514+
515+ | Version | Key Changes |
516+ |---------|------------|
517+ | 0.12.0 | Engine-wide parallelization : 6 parallel paths, MaxParallel=4, phase parallelism, parallel QA, parallel self-critique, parallel review, wave fast-path |
518+ | 0.11.0 | HITL defaults to ask, File Browser (workspace tree API), `--kill` CLI flag, single run input |
519+ | 0.10.x | SessionStorage state persistence, blocks CLI, Studio LiveView, code review comments, SLM-optimized prompts |
520+
0 commit comments