apm-core 0.1.21

Core library for APM — a git-native project manager for parallel AI coding agents.
Documentation
[workflow]

[[workflow.states]]
id    = "new"
label = "New"

  [[workflow.states.transitions]]
  to      = "groomed"
  trigger = "manual"
  outcome = "needs_input"

  [[workflow.states.transitions]]
  to      = "closed"
  trigger = "manual"
  outcome = "cancelled"

[[workflow.states]]
id           = "groomed"
label        = "Groomed"
actionable   = ["agent"]
dep_requires = "spec"
instructions = ".apm/agents/default/apm.spec-writer.md"

  [[workflow.states.transitions]]
  to              = "in_design"
  trigger         = "command:start"
  profile         = "spec_agent"
  context_section = "Problem"
  instructions    = ".apm/agents/default/apm.spec-writer.md"
  role_prefix     = "You are a Spec-Writer agent assigned to ticket #<id>."
  outcome         = "needs_input"

  [[workflow.states.transitions]]
  to      = "closed"
  trigger = "manual"
  outcome = "cancelled"

[[workflow.states]]
id         = "question"
label      = "Question"
actionable = ["supervisor"]

  [[workflow.states.transitions]]
  to      = "groomed"
  trigger = "manual"
  outcome = "needs_input"

  [[workflow.states.transitions]]
  to      = "closed"
  trigger = "manual"
  outcome = "cancelled"

[[workflow.states]]
id             = "specd"
label          = "Specd"
actionable     = ["supervisor"]
satisfies_deps = "spec"
worker_end     = true

  [[workflow.states.transitions]]
  to      = "ready"
  trigger = "manual"
  outcome = "needs_input"

  [[workflow.states.transitions]]
  to      = "ammend"
  trigger = "manual"
  outcome = "needs_input"

  [[workflow.states.transitions]]
  to      = "closed"
  trigger = "manual"
  outcome = "cancelled"

[[workflow.states]]
id             = "ammend"
label          = "Ammend"
actionable     = ["agent"]
dep_requires   = "spec"
satisfies_deps = "spec"
instructions   = ".apm/agents/default/apm.spec-writer.md"

  [[workflow.states.transitions]]
  to      = "specd"
  trigger = "manual"
  outcome = "success"

  [[workflow.states.transitions]]
  to      = "question"
  trigger = "manual"
  outcome = "needs_input"

  [[workflow.states.transitions]]
  to           = "in_design"
  trigger      = "command:start"
  profile      = "spec_agent"
  instructions = ".apm/agents/default/apm.spec-writer.md"
  role_prefix  = "You are a Spec-Writer agent assigned to ticket #<id>."
  outcome      = "needs_input"

  [[workflow.states.transitions]]
  to      = "closed"
  trigger = "manual"
  outcome = "cancelled"

[[workflow.states]]
id           = "in_design"
label        = "In Design"
instructions = ".apm/agents/default/apm.spec-writer.md"

  [[workflow.states.transitions]]
  to      = "specd"
  trigger = "manual"
  outcome = "success"

  [[workflow.states.transitions]]
  to      = "question"
  trigger = "manual"
  outcome = "needs_input"

  [[workflow.states.transitions]]
  to      = "ammend"
  trigger = "manual"
  outcome = "needs_input"

  [[workflow.states.transitions]]
  to      = "closed"
  trigger = "manual"
  outcome = "cancelled"

[[workflow.states]]
id             = "ready"
label          = "Ready"
actionable     = ["agent"]
satisfies_deps = "spec"
instructions   = ".apm/agents/default/apm.worker.md"

  [[workflow.states.transitions]]
  to           = "in_progress"
  trigger      = "command:start"
  instructions = ".apm/agents/default/apm.worker.md"
  role_prefix  = "You are a Worker agent assigned to ticket #<id>."
  outcome      = "needs_input"

  [[workflow.states.transitions]]
  to      = "ammend"
  trigger = "manual"
  outcome = "needs_input"

  [[workflow.states.transitions]]
  to      = "specd"
  trigger = "manual"
  outcome = "needs_input"

  [[workflow.states.transitions]]
  to      = "closed"
  trigger = "manual"
  outcome = "cancelled"

[[workflow.states]]
id             = "in_progress"
label          = "In Progress"
satisfies_deps = "spec"
instructions   = ".apm/agents/default/apm.worker.md"

  [[workflow.states.transitions]]
  to         = "implemented"
  trigger    = "manual"
  completion = "pr_or_epic_merge"
  on_failure = "merge_failed"
  outcome    = "success"

  [[workflow.states.transitions]]
  to      = "blocked"
  trigger = "manual"
  label   = "Agent is blocked — wrote questions in ### Open questions"
  outcome = "needs_input"

  [[workflow.states.transitions]]
  to      = "ready"
  trigger = "manual"
  warning = "Reverting in_progress ticket to ready — any uncommitted work on the branch may be lost"
  outcome = "needs_input"

  [[workflow.states.transitions]]
  to      = "ammend"
  trigger = "manual"
  outcome = "needs_input"

  [[workflow.states.transitions]]
  to      = "closed"
  trigger = "manual"
  outcome = "cancelled"

[[workflow.states]]
id         = "blocked"
label      = "Blocked"
actionable = ["supervisor"]

  [[workflow.states.transitions]]
  to      = "ready"
  trigger = "manual"
  label   = "Supervisor answered questions — agent can resume"
  outcome = "needs_input"

  [[workflow.states.transitions]]
  to      = "closed"
  trigger = "manual"
  outcome = "cancelled"

[[workflow.states]]
id             = "implemented"
label          = "Implemented"
actionable     = ["supervisor"]
satisfies_deps = true
worker_end     = true

  [[workflow.states.transitions]]
  to            = "ready"
  trigger       = "manual"
  focus_section = "Code review"
  outcome       = "needs_input"

  [[workflow.states.transitions]]
  to      = "ammend"
  trigger = "manual"
  outcome = "needs_input"

  [[workflow.states.transitions]]
  to      = "in_progress"
  trigger = "manual"
  outcome = "needs_input"

  [[workflow.states.transitions]]
  to      = "closed"
  trigger = "manual"
  outcome = "cancelled"

[[workflow.states]]
id         = "merge_failed"
label      = "Merge failed"
actionable = ["supervisor"]

  [[workflow.states.transitions]]
  to      = "implemented"
  trigger = "manual"
  outcome = "needs_input"

  [[workflow.states.transitions]]
  to      = "in_progress"
  trigger = "manual"
  outcome = "needs_input"

[[workflow.states]]
id             = "closed"
label          = "Closed"
terminal       = true
satisfies_deps = true

[workflow.prioritization]
priority_weight = 10.0
effort_weight   = -2.0
risk_weight     = -1.0