story-kit: support agent assignment via story front matter (story 249)
Adds an optional `agent:` field to story file front matter so that a specific agent can be requested for a story. The auto-assign loop now: 1. Reads the front-matter `agent` field for each story before picking a free agent. 2. If a preferred agent is named, uses it when free; skips the story (without falling back) when that agent is busy. 3. Falls back to the existing `find_free_agent_for_stage` behaviour when no preference is specified. Ported from feature branch that predated the agents.rs module refactoring. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -7,6 +7,7 @@ pub struct StoryMetadata {
|
||||
pub name: Option<String>,
|
||||
pub coverage_baseline: Option<String>,
|
||||
pub merge_failure: Option<String>,
|
||||
pub agent: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||
@@ -29,6 +30,7 @@ struct FrontMatter {
|
||||
name: Option<String>,
|
||||
coverage_baseline: Option<String>,
|
||||
merge_failure: Option<String>,
|
||||
agent: Option<String>,
|
||||
}
|
||||
|
||||
pub fn parse_front_matter(contents: &str) -> Result<StoryMetadata, StoryMetaError> {
|
||||
@@ -61,6 +63,7 @@ fn build_metadata(front: FrontMatter) -> StoryMetadata {
|
||||
name: front.name,
|
||||
coverage_baseline: front.coverage_baseline,
|
||||
merge_failure: front.merge_failure,
|
||||
agent: front.agent,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user