This commit is contained in:
Rai (Michael Pokorny)
2025-06-25 02:33:32 -07:00
parent ca4cf88334
commit c4b1beea57
6 changed files with 32 additions and 9 deletions

View File

@@ -59,7 +59,7 @@ Tasks live under `agentydragon/tasks/` as individual Markdown files. Please upda
-
- Without `--agent`, this creates or reuses a worktree at
- `agentydragon/tasks/.worktrees/<task-id>-<task-slug>` off the `agentydragon` branch.
- With `--agent`, after setup it launches the Developer Codex agent in that workspace (using `prompts/developer.md` and the task file),
- With `--agent`, after setup it runs pre-commit checks (aborting on failure), then launches the Developer Codex agent in that workspace (using `prompts/developer.md` and the task file),
- and when the developer agent exits, it automatically runs the Commit agent helper to stage fixes and commit the work.
**Commit agent helper**: in `agentydragon/tasks/`, run:

View File

@@ -1,7 +1,7 @@
+++
id = "25"
title = "Guard Against Missing Tool Output in Rust Server Sequencing"
status = "Reopened"
status = "Needs input"
dependencies = "" # No prerequisites
last_updated = "2025-06-25T22:50:01.000000"
+++

View File

@@ -26,8 +26,9 @@ while [[ $# -gt 0 ]]; do
Usage: $0 [-a|--agent] [-s|--shell] [-i|--interactive] [-t|--tmux] <task-slug|NN> [<task-slug|NN>...]
Options:
-a, --agent create/reuse worktree and launch a Codex agent with prompt injection;
when the agent exits, auto-run commit helper
-a, --agent create/reuse worktree, run pre-commit checks (aborting on failure),
and launch a Codex agent with prompt injection; when the agent exits,
auto-run commit helper
-s, --shell create/reuse worktree and launch an interactive Codex shell
(no prompt injection, skip auto-commit)
-i, --interactive run the agent in interactive mode (no 'exec'); implies --agent
@@ -140,6 +141,16 @@ echo "Done."
if [ "$agent_mode" = true ]; then
echo "Launching Developer Codex agent for task $task_slug in sandboxed worktree"
cd "${worktree_path}"
# Before launching the developer agent, run pre-commit checks and abort if hooks fail
if command -v pre-commit >/dev/null 2>&1; then
echo "Running pre-commit checks in $(pwd)"
if ! pre-commit run --all-files; then
echo "Error: pre-commit checks failed. Fix issues before launching the developer agent." >&2
exit 1
fi
else
echo "Warning: pre-commit is not installed; skipping pre-commit checks." >&2
fi
echo "Launching Developer Codex agent for task $task_slug in sandboxed worktree"
if [ "$shell_mode" = true ]; then
# Interactive shell mode: no prompt, skip commit helper

View File

@@ -14,10 +14,14 @@ def main():
# Load all tasks and separate merged vs non-merged
merged = set()
deps_map = {}
id_to_path = {}
# skip template/plan files and any worktree copies
wt_root = task_dir() / '.worktrees'
for md in task_dir().rglob('[0-9][0-9]-*.md'):
if md.name == 'task-template.md' or md.name.endswith('-plan.md'):
if md.name == 'task-template.md' or md.name.endswith('-plan.md') or md.is_relative_to(wt_root):
continue
meta, _ = load_task(md)
id_to_path[meta.id] = md
if meta.status == 'Merged':
merged.add(meta.id)
else:
@@ -36,7 +40,11 @@ def main():
def visit(n):
if n in stack:
cycle = stack[stack.index(n):] + [n]
print(f"Circular dependency detected: {' -> '.join(cycle)}")
cycle_str = ' -> '.join(cycle)
print(f"Circular dependency detected: {cycle_str}", file=sys.stderr)
print("Paths involved in cycle:", file=sys.stderr)
for tid in cycle:
print(f" {id_to_path.get(tid, tid)}", file=sys.stderr)
sys.exit(1)
if n in visited:
return

View File

@@ -28,13 +28,15 @@ ALLOWED_STATUSES = ["Not started", "Started", "Needs manual review", "Done", "Ca
def main():
failures = 0
# skip template/plan files and any worktree copies
wt_root = tasklib.worktree_dir()
for md in tasklib.task_dir().rglob('[0-9][0-9]-*.md'):
if md.name == 'task-template.md' or md.name.endswith('-plan.md'):
if md.name == 'task-template.md' or md.name.endswith('-plan.md') or md.is_relative_to(wt_root):
continue
try:
task, _body = tasklib.load_task(md)
except ValueError as e:
print(e)
print(f"{md}: {e}", file=sys.stderr)
failures += 1
if failures:

View File

@@ -31,8 +31,10 @@ def status():
# Load all task metadata, reporting load errors with file path
all_meta: dict[str, TaskMeta] = {}
path_map: dict[str, Path] = {}
wt_root = worktree_dir()
for md in sorted(task_dir().rglob('[0-9][0-9]-*.md')):
if md.name in ('task-template.md',) or md.name.endswith('-plan.md'):
# skip task template, plan files, and any worktree copies
if md.name in ('task-template.md',) or md.name.endswith('-plan.md') or md.is_relative_to(wt_root):
continue
try:
meta, _ = load_task(md)