This commit is contained in:
Rai (Michael Pokorny)
2025-06-25 02:17:48 -07:00
parent bf0e850325
commit b841b834fe
4 changed files with 29 additions and 12 deletions

View File

@@ -6,11 +6,12 @@
## 1. Developer Agent
- **Scope**: Runs inside a sandboxed git worktree for a single task branch (`agentydragon-<ID>-<slug>`).
- **Actions**:
1. Update the task Markdown files **Status** to `Done` when implementation is complete.
2. Implement the code changes for the task.
3. Run `pre-commit run --files $(git diff --name-only)` to apply and stage any autofix changes.
4. **Do not** run `git commit`.
- **Actions**:
1. If the tasks **Status** is `Needs input`, stop immediately and await further instructions; do **not** implement code changes or run pre-commit hooks.
2. Update the task Markdown files **Status** to `Done` when implementation is complete.
3. Implement the code changes for the task.
4. Run `pre-commit run --files $(git diff --name-only)` to apply and stage any autofix changes.
5. **Do not** run `git commit`.
## 2. Commit Agent
- **Scope**: Runs in the sandbox (read-only `.git`) or equivalent environment.

View File

@@ -14,10 +14,11 @@ Then proceed directly to implement the full functionality in the codebase as a s
Do not pause to seek user confirmation after editing the Markdown;
only ask clarifying questions if you encounter genuine ambiguities in the requirements.
At any point, you may set the tasks **Status** to any valid state (e.g. Not started, Started, Needs input, Needs manual review, Done, Cancelled) as appropriate. Use **Needs input** to request further clarification or resources before proceeding.
At any point, you may set the tasks **Status** to any valid state (e.g. Not started, In progress, Needs input, Needs manual review, Done, Cancelled) as appropriate. Use **Needs input** to request further clarification or resources before proceeding.
When you have completed the implementation and updated the task file:
set the tasks **Status** to "Done".
- Run the repositorys pre-commit hooks on all changed files (e.g. `pre-commit run --files <changed-files>`), and stage any autofix changes.
- Do **not** stage or commit beyond hook-driven fixes. Instead, stop and await the Commit agent to record your updates.
When you have finished working on the task file:
- If the tasks **Status** is "Needs input", stop immediately and await further instructions; do **not** run pre-commit hooks or invoke the Commit agent.
- Otherwise, set the tasks **Status** to "Done".
- Run the repositorys pre-commit hooks on all changed files (e.g. `pre-commit run --files <changed-files>`), and stage any autofix changes.
- Do **not** stage or commit beyond hook-driven fixes. Instead, stop and await the Commit agent to record your updates.
Then stop and await further instructions.

View File

@@ -2,13 +2,14 @@
id = "<NN>"
title = "<Task Title>"
status = "<<<!!! MANAGER: SET VALID STATUS - Not started? !!!>>>"
freeform_status = "<<<!!! MANAGER/DEVELOPER: Freeform status text, optional. E.g. progress notes or developer comments. !!!>>>"
dependencies = [<<<!!! MANAGER: LIST TASK IDS THAT MUST BE COMPLETED BEFORE STARTING; SEPARATED BY COMMAS, E.G. "02","05" !!!>>>] # <!-- Manager rationale: explain why these dependencies are required and why other tasks are not. -->
last_updated = "<timestamp in ISO format>"
+++
# Task Template
# Valid status values: Not started | Started | Needs input | Needs manual review | Done | Cancelled
# Valid status values: Not started | In progress | Needs input | Needs manual review | Done | Cancelled | Merged
> *This task is specific to codex-rs.*

View File

@@ -8,6 +8,7 @@ from datetime import datetime
from pathlib import Path
import toml
from enum import Enum
from pydantic import BaseModel, Field
FRONTMATTER_RE = re.compile(r"^\+\+\+\s*(.*?)\s*\+\+\+", re.S | re.M)
@@ -21,10 +22,20 @@ def task_dir():
def worktree_dir():
return task_dir() / ".worktrees"
class TaskStatus(str, Enum):
NOT_STARTED = "Not started"
IN_PROGRESS = "In progress"
NEEDS_INPUT = "Needs input"
NEEDS_MANUAL_REVIEW = "Needs manual review"
DONE = "Done"
CANCELLED = "Cancelled"
MERGED = "Merged"
class TaskMeta(BaseModel):
id: str
title: str
status: str
status: TaskStatus
freeform_status: str = Field(default="")
dependencies: str = Field(default="")
last_updated: datetime = Field(default_factory=datetime.utcnow)
@@ -40,6 +51,9 @@ def load_task(path: Path) -> (TaskMeta, str):
def save_task(path: Path, meta: TaskMeta, body: str) -> None:
tm = meta.dict()
# Serialize enum to its string value for front-matter
if isinstance(tm.get('status'), Enum):
tm['status'] = tm['status'].value
tm['last_updated'] = meta.last_updated.isoformat()
fm = toml.dumps(tm).strip()
content = f"+++\n{fm}\n+++\n\n{body.lstrip()}"