Sort do-epic's imports and cite code health from one constant
CI / tests (pull_request) Successful in 3m52s
CI / tests (pull_request) Successful in 3m52s
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
"""What a do-epic cycle's worker is told: its task, from the issue, and its first prompt. The resumed prompt and the rung sentences are the ones loop-claude's cycles use, naming do-epic."""
|
||||
from do_epic.backend.protocol import EpicIssue
|
||||
from loop_claude.cycle import prompts
|
||||
from model_routing.ladder import ProjectRung
|
||||
from loop_claude.cycle import prompts
|
||||
from model_routing.route import Route
|
||||
|
||||
# The entry point's name as the worker, the judge and the human read it.
|
||||
@@ -14,11 +14,15 @@ def task(issue: EpicIssue, epic: str, checkout: str | None) -> str:
|
||||
return f"Work the Jira issue {issue.key} of the epic {epic} as one chunk, {where}. Its summary: {issue.summary}" + (f"\n\nIts description:\n\n{issue.detail}" if issue.detail else "")
|
||||
|
||||
|
||||
# Where code health is stated.
|
||||
CODE_HEALTH = '~/.claude/CLAUDE.md → "Shared goal"'
|
||||
|
||||
|
||||
def fresh(task: str, premises: str, route: Route, project: ProjectRung | None, facts: str) -> str:
|
||||
"""A chunk's first prompt. facts is empty: do-epic runs no preflight."""
|
||||
routed = f"{DRIVER} runs you on {route.rung}, routed by the issue's L of {route.likelihood}. Where a sentence below names item {route.item}, it means the issue." if route.item else ""
|
||||
opening = " ".join(filter(None, [routed, *prompts.rung_sentences(DRIVER, route, project)]))
|
||||
return f"{task}\n\nContinue any open draft PR or worktree for the chunk before creating a new one. {prompts.READING_RULE}\n\n{opening and f'{opening}{chr(10)}{chr(10)}'}The issue sets the chunk's scope. The goals below choose between ways to deliver that scope, and never widen it: the epic's first, then code health (~/.claude/CLAUDE.md → \"Shared goal\"), then the repo's.\n\nFrom {premises}"
|
||||
return f"{task}\n\nContinue any open draft PR or worktree for the chunk before creating a new one. {prompts.READING_RULE}\n\n{opening and f'{opening}{chr(10)}{chr(10)}'}The issue sets the chunk's scope. The goals below choose between ways to deliver that scope, and never widen it: the epic's first, then code health ({CODE_HEALTH}), then the repo's.\n\nFrom {premises}"
|
||||
|
||||
|
||||
# The worker names no plan items: the chunk's one item is its issue.
|
||||
|
||||
+24
-24
@@ -5,36 +5,36 @@ import dataclasses
|
||||
import pathlib
|
||||
import typing
|
||||
|
||||
from agent_cycle import tmux
|
||||
from agent_cycle.direct_message import tell
|
||||
from agent_cycle.routing import judge_rung
|
||||
from agent_cycle.run import Cycle, run_cycle
|
||||
from agent_cycle.stop import Stop
|
||||
from agent_cycle.verdicts import Finished, TakenIn
|
||||
from claude_code.session import session_named
|
||||
from do_epic import chunk_prompt, scheduler
|
||||
from do_epic.backend.jira import JiraEpic
|
||||
from do_epic.backend.protocol import EpicIssue, EpicStore
|
||||
from do_epic.config import DoEpicConfig, load
|
||||
from do_epic.epic_record import EpicRecord
|
||||
from do_epic.repo_pick import recorded, Repo
|
||||
from do_epic.repos import locate
|
||||
from failure import Failure
|
||||
from loop_claude.loop.chunk_start import archived_route, routed
|
||||
from do_epic import chunk_prompt, scheduler
|
||||
from loop_claude.loop.close import closed_cycle
|
||||
from loop_claude.loop.main import setup_version
|
||||
from loop_claude.loop.reload import LoopRun
|
||||
from loop_claude.loop.this_loop import Loop
|
||||
from loop_claude.project.model_choice import get_or_ask_models, Models
|
||||
from loop_claude.project.premises import read_premises
|
||||
from loop_claude.project.records import read_records
|
||||
from agent_cycle.run import Cycle, run_cycle
|
||||
from do_epic.config import DoEpicConfig, load
|
||||
from loop_effects.effects import Effects, say
|
||||
from loop_state.paths import Paths
|
||||
from model_routing.ladder_file import project_ladder_file, read_ladder, SHIPPED
|
||||
from plan_store.jira_epic import ISSUE_KEY
|
||||
from project_config.settings import Epic
|
||||
from record_store.jira_description import EpicDescription
|
||||
from do_epic.backend.protocol import EpicIssue, EpicStore
|
||||
from do_epic.epic_record import EpicRecord
|
||||
from failure import Failure
|
||||
from agent_cycle.verdicts import Finished, TakenIn
|
||||
from loop_claude.project.model_choice import get_or_ask_models, Models
|
||||
from plan_store.jira_epic import ISSUE_KEY
|
||||
from do_epic.backend.jira import JiraEpic
|
||||
from agent_cycle.routing import judge_rung
|
||||
from do_epic.repos import locate
|
||||
from loop_claude.loop.this_loop import Loop
|
||||
from loop_claude.loop.reload import LoopRun
|
||||
from loop_state.paths import Paths
|
||||
from transcript_archive.project_key import project_key
|
||||
from model_routing.ladder_file import project_ladder_file, read_ladder, SHIPPED
|
||||
from loop_claude.project.premises import read_premises
|
||||
from loop_claude.project.records import read_records
|
||||
from do_epic.repo_pick import recorded, Repo
|
||||
from claude_code.session import session_named
|
||||
from loop_claude.loop.main import setup_version
|
||||
from agent_cycle.stop import Stop
|
||||
from agent_cycle.direct_message import tell
|
||||
from agent_cycle import tmux
|
||||
|
||||
HELP = f"""usage: do-epic <EPIC-KEY>
|
||||
|
||||
|
||||
@@ -5,15 +5,15 @@ import dataclasses
|
||||
import pathlib
|
||||
import typing
|
||||
|
||||
from agent_cycle import tmux
|
||||
from do_epic.backend.protocol import EpicIssue
|
||||
from do_epic.epic_record import CAP
|
||||
from do_epic.repo_pick import HumanTask, recorded, Repo
|
||||
from do_epic.split import SPLIT_LABEL
|
||||
from failure import Failure
|
||||
from loop_claude.loop.chunk_windows import epic_chunks, HANDED, LOCK, project_lock, starting
|
||||
from do_epic.backend.protocol import EpicIssue
|
||||
from failure import Failure
|
||||
from do_epic.repo_pick import HumanTask, recorded, Repo
|
||||
from project_config.settings import PARALLEL_CHUNKS
|
||||
from transcript_archive.project_key import project_key
|
||||
from do_epic.split import SPLIT_LABEL
|
||||
from agent_cycle import tmux
|
||||
|
||||
# Under the home folder, a folder per epic key holds the epic's LOCK. A chunk without a repo works there.
|
||||
STATE = ".local/state/do-epic"
|
||||
|
||||
@@ -8,20 +8,20 @@ import unittest
|
||||
|
||||
sys.path.insert(0, str(pathlib.Path(__file__).resolve().parents[1]))
|
||||
|
||||
from agent_cycle import escalation_mark, judge, tmux
|
||||
from do_epic import chunk_prompt, main
|
||||
from do_epic.backend.fake import MemoryEpic
|
||||
from do_epic.backend.protocol import EpicIssue
|
||||
from do_epic.epic_record import EpicRecord
|
||||
from do_epic.test_do_epic import SETTINGS
|
||||
from do_epic.test_scheduler import issue
|
||||
from agent_cycle import escalation_mark, judge, tmux
|
||||
from failure import Failure
|
||||
from loop_claude.loop.reload import LoopRun
|
||||
from loop_claude.loop.this_loop import Loop
|
||||
from loop_claude.test_loop_claude import FakeEffects
|
||||
from do_epic.test_scheduler import issue
|
||||
from loop_claude.loop.this_loop import Loop
|
||||
from loop_claude.loop.reload import LoopRun
|
||||
from do_epic.backend.fake import MemoryEpic
|
||||
from loop_state.paths import paths_from
|
||||
from model_routing.ladder import Rung
|
||||
from model_routing.route import Route
|
||||
from model_routing.ladder import Rung
|
||||
from do_epic.test_do_epic import SETTINGS
|
||||
|
||||
DESCRIPTION = "**Max parallel chunks:** 2\n\n## Goals\nShip the import.\n\n## Audience\nThe client's team.\n"
|
||||
|
||||
|
||||
@@ -6,11 +6,11 @@ import unittest
|
||||
|
||||
sys.path.insert(0, str(pathlib.Path(__file__).resolve().parents[1]))
|
||||
|
||||
from agent_cycle import tmux
|
||||
from do_epic.scheduler import Chunk, CHUNK_FLAG, chunks, Epic, refusal, RepoRoom, start_chunks, Started, Waits
|
||||
from do_epic.backend.protocol import EpicIssue
|
||||
from do_epic.epic_record import parallel_chunks_in
|
||||
from do_epic.scheduler import Chunk, chunks, CHUNK_FLAG, Epic, RepoRoom, refusal, start_chunks, Started, Waits
|
||||
from failure import Failure
|
||||
from do_epic.epic_record import parallel_chunks_in
|
||||
from agent_cycle import tmux
|
||||
|
||||
|
||||
def issue(key: str, *labels: str, done: bool = False, blockers: tuple[str, ...] = (), parent: str = "ABC-12") -> EpicIssue:
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
import functools
|
||||
import typing
|
||||
|
||||
from agent_cycle.escalation_mark import asks_higher_rung
|
||||
from agent_cycle.worker_prompts import answers_recorded, WorkerPrompts
|
||||
from agent_cycle.escalation_mark import asks_higher_rung
|
||||
from model_routing.review_choice import chosen, ReviewChoice
|
||||
from loop_claude.cycle.chunk_items import CHUNK_ITEMS
|
||||
from model_routing.route import ESCALATION_MARKER, Route
|
||||
|
||||
Reference in New Issue
Block a user