Skip to content

feat: inject concurrent agent count into persona system prompt#181

Draft
nextlevelshit wants to merge 1 commit intomainfrom
112-concurrent-agent-prompt
Draft

feat: inject concurrent agent count into persona system prompt#181
nextlevelshit wants to merge 1 commit intomainfrom
112-concurrent-agent-prompt

Conversation

@nextlevelshit
Copy link
Collaborator

Summary

  • Adds max_concurrent_agents field to pipeline step configuration with validation (1-10 range)
  • Injects a concurrency directive into the persona's generated CLAUDE.md when the value exceeds 1
  • Carries the concurrency setting through to AdapterRunConfig for adapter-level awareness
  • Includes spec, plan, and tasks documentation for the feature

Closes #112

Changes

  • internal/pipeline/types.go — Added MaxConcurrentAgents field to Step struct with YAML/JSON tags
  • internal/pipeline/validation.go — Added validation for max_concurrent_agents range (1-10)
  • internal/pipeline/validation_test.go — Table-driven tests for concurrency field validation
  • internal/pipeline/executor.go — Passes MaxConcurrentAgents to adapter run config
  • internal/adapter/adapter.go — Added MaxConcurrentAgents to AdapterRunConfig
  • internal/adapter/claude.go — Injects concurrency section into generated CLAUDE.md between contract compliance and restrictions
  • internal/adapter/claude_test.go — Tests for prompt generation with and without concurrency hints
  • specs/112-concurrent-agent-prompt/ — Feature spec, plan, and task list

Test Plan

  • Unit tests verify CLAUDE.md prompt generation includes concurrency directive when max_concurrent_agents > 1
  • Unit tests verify no concurrency section when value is 0 or 1
  • Validation tests confirm rejection of values outside 1-10 range and acceptance of valid values
  • Integration test verifies the concurrency hint appears in adapter invocation config
  • All tests pass via go test ./...

Add max_concurrent_agents field to pipeline step configuration that
controls how many sub-agents a persona may spawn during execution.

- Add MaxConcurrentAgents to Step struct (yaml: max_concurrent_agents)
- Add MaxConcurrentAgents to AdapterRunConfig for adapter propagation
- Add ValidateMaxConcurrentAgents bounds check (0-10, Claude Code cap)
- Build concurrency section in CLAUDE.md when value > 1
- Wire executor → adapter propagation in runStepExecution
- Add comprehensive tests: unit, integration, and propagation
@nextlevelshit nextlevelshit marked this pull request as draft February 28, 2026 23:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: inject concurrent agent count into persona system prompt from pipeline definition

1 participant