Skip to content

The agent that grows with you

refactor(kanban-cli): join implicit string fragments (AST-identical)

Teknium535003c68a29
diff --git a/hermes_cli/kanban_diagnostics.py b/hermes_cli/kanban_diagnostics.py
index e8bc6976d95..ac887488cee 100644
--- a/hermes_cli/kanban_diagnostics.py
+++ b/hermes_cli/kanban_diagnostics.py
@@ -415,8 +415,7 @@ def _rule_repeated_failures(task, events, runs, now, cfg) -> list[Diagnostic]:
title = f"Agent {outcome_label} x{failures}: {err_snippet.splitlines()[0][:160]}"
detail = (
f"This task has failed {failures} times in a row "
- f"(most recent: {outcome_label}). Full last error:\n\n"
- f"{err_snippet}\n\n"
+ f"(most recent: {outcome_label}). Full last error:\n\n{err_snippet}\n\n"
f"The dispatcher circuit breaker is configured for "
f"{failure_limit} consecutive non-success attempts. Fix the "
f"root cause and reclaim or unblock the task to retry."
diff --git a/hermes_cli/kanban_ops.py b/hermes_cli/kanban_ops.py
index faf5d78567c..26190702ca8 100644
--- a/hermes_cli/kanban_ops.py
+++ b/hermes_cli/kanban_ops.py
@@ -181,8 +181,7 @@ def _cmd_daemon(args: argparse.Namespace) -> int:
f"Kanban dispatcher running STANDALONE via --force "
f"(interval={args.interval}s, pid={os.getpid()}). "
f"Ctrl-C to stop. NOTE: if a gateway is also running with "
- f"dispatch_in_gateway=true (default), you have two dispatchers "
- f"racing for claims.",
+ f"dispatch_in_gateway=true (default), you have two dispatchers racing for claims.",
file=sys.stderr,
)
@@ -214,8 +213,7 @@ def _cmd_daemon(args: argparse.Namespace) -> int:
f"consecutive ticks but 0 workers spawned successfully. "
f"Check profile health (venv, PATH, credentials) and "
f"`hermes kanban list --status ready` / "
- f"`hermes kanban list --status blocked` for recent "
- f"spawn_failed tasks.",
+ f"`hermes kanban list --status blocked` for recent spawn_failed tasks.",
file=sys.stderr, flush=True,
)
health_state["last_warn_at"] = now
diff --git a/hermes_cli/kanban_parser.py b/hermes_cli/kanban_parser.py
index ae8c7166e19..56e506e8aea 100644
--- a/hermes_cli/kanban_parser.py
+++ b/hermes_cli/kanban_parser.py
@@ -179,14 +179,12 @@ _SPECS = [
"circuit breaker. Trip on the Nth failure — "
"e.g. --max-retries 1 blocks on the first "
"failure (no retries), --max-retries 3 allows "
- "two retries. Omit to use the dispatcher's "
- "kanban.failure_limit config "
+ "two retries. Omit to use the dispatcher's kanban.failure_limit config "
f"(default {kb.DEFAULT_FAILURE_LIMIT})."),
_arg("--model", default=None, dest="model_override",
help="Pin the worker to this model (passed as -m <model>) without "
"changing the profile's configured model. Combine with --provider "
- "when the model belongs to a different backend than the profile's "
- "default."),
+ "when the model belongs to a different backend than the profile's default."),
_arg("--provider", default=None, dest="provider_override",
help="Provider the --model belongs to (passed as --provider <name> to "
"the worker). Requires --model."),
@@ -318,8 +316,7 @@ _SPECS = [
_arg("--metadata", default=None, help="JSON object with structured reviewer handoff facts."),
_arg("--force", action="store_true",
help="Override the live-claim guard: move a running, claimed "
- "task to review even without owning its run (clears the "
- "worker's claim)."),
+ "task to review even without owning its run (clears the worker's claim)."),
], help="Move a task to 'review' (implementation done, awaiting review) — NOT a block"),
_cmd("request-changes", [_TASK_ID, _arg("reason", nargs="+", help="Concrete changes required before re-review")],
help="Reviewer verdict: return the active review run to its implementer"),
@@ -410,8 +407,7 @@ _SPECS = [
help="Decompose a triage-column task into a graph of child tasks "
"routed to specialist profiles by description. Falls back "
"to specify-style single-task promotion when the task "
- "doesn't benefit from fan-out. Uses "
- "auxiliary.kanban_decomposer."),
+ "doesn't benefit from fan-out. Uses auxiliary.kanban_decomposer."),
_cmd("gc", [
_arg("--event-retention-days", type=int, default=30,
help="Delete task_events older than N days for terminal tasks (default: 30)"),
diff --git a/hermes_cli/kanban_swarm.py b/hermes_cli/kanban_swarm.py
index 813ac8f38cb..a4cae7b52ca 100644
--- a/hermes_cli/kanban_swarm.py
+++ b/hermes_cli/kanban_swarm.py
@@ -60,8 +60,7 @@ def _require_text(value: str, field_name: str) -> str:
def _swarm_context(root_id: str, goal: str) -> str:
return (
- "\n\n## Swarm protocol\n"
- f"- Swarm root / shared blackboard: `{root_id}`.\n"
+ f"\n\n## Swarm protocol\n- Swarm root / shared blackboard: `{root_id}`.\n"
"- Read sibling/parent handoffs from Kanban context before working.\n"
"- Put machine-readable facts in completion metadata.\n"
"- Put cross-worker notes on the root task using structured comments.\n"
@@ -213,8 +212,7 @@ def _create_swarm_uncommitted(
body=(
"Kanban Swarm v1 planning/root card. This card is completed "
"immediately so parallel workers can start while it remains the "
- "shared blackboard and audit anchor.\n\n"
- f"Goal:\n{goal}"
+ f"shared blackboard and audit anchor.\n\nGoal:\n{goal}"
),
assignee=created_by,
priority=priority,