Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions .project/PROMPT.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ If HANDOFF.md doesn't exist, this is the first iteration. Read `.project/SPEC.md
### 2. Pick a Task

```bash
.project/task next
python .project/task next
```

This returns the highest-priority task with satisfied dependencies. If it returns an in-progress task, a previous iteration crashed — pick up where it left off.
Expand All @@ -30,15 +30,15 @@ echo "DONE: All tasks complete" > .project/STOP
### 3. Read the Task

```bash
.project/task <ID>
python .project/task <ID>
```

Read the full task file. Understand the acceptance criteria before writing any code.

### 4. Implement

```bash
.project/task <ID> progress
python .project/task <ID> progress
```

Mark it in-progress, then implement. Follow existing code patterns. Make the smallest change that satisfies the acceptance criteria.
Expand All @@ -55,7 +55,7 @@ Run the project's quality checks (lint, typecheck, test — whatever applies). D
### 6. Complete

```bash
.project/task <ID> done
python .project/task <ID> done
```

Commit your changes:
Expand Down Expand Up @@ -83,13 +83,13 @@ git add -A && git commit -m "feat(<scope>): <ID> - <description>"
<anything the next iteration needs to know>

## Remaining Work
<output of .project/task list>
<output of python .project/task list>
```

### 8. Check for Completion

```bash
.project/task list
python .project/task list
```

If all tasks are done (nothing under OPEN or IN PROGRESS), write a STOP file:
Expand Down Expand Up @@ -117,3 +117,4 @@ echo "CLARIFY: <question for the human>" > .project/STOP
- **Always write HANDOFF.md last.** It's the next iteration's memory.
- **Don't be clever.** Simple, obvious code that works.
- **Commit after completing each task.** Never leave uncommitted work.
- **Use the Python venv.** If a `.venv` directory does not yet exist, create one with `python -m venv .venv` and activate it with `source .venv/Scripts/activate` (Windows) or `source .venv/bin/activate` (Linux/macOS) before installing packages or running Python commands. Always activate the venv before running pip, pytest, ruff, or any project Python code. Check for the venv at the start of every iteration.
10 changes: 5 additions & 5 deletions .project/loop
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ LOGS_DIR = os.path.join(SCRIPT_DIR, "logs")


def read_file(path):
with open(path, "r") as f:
with open(path, "r", encoding="utf-8") as f:
return f.read()


Expand All @@ -42,7 +42,7 @@ def clean_stale_stop():

def ensure_learnings():
if not os.path.exists(LEARNINGS_FILE):
with open(LEARNINGS_FILE, "w") as f:
with open(LEARNINGS_FILE, "w", encoding="utf-8") as f:
f.write("# Learnings\n\nPatterns and gotchas discovered during implementation.\n")


Expand Down Expand Up @@ -178,7 +178,7 @@ def run_iteration(iteration, model=None, verbose=False):
cwd=PROJECT_DIR,
)

with open(jsonl_path, "w") as jsonl_file:
with open(jsonl_path, "w", encoding="utf-8") as jsonl_file:
for raw_line in proc.stdout:
line = raw_line.decode("utf-8", errors="replace")
# Write raw JSON to log
Expand Down Expand Up @@ -244,7 +244,7 @@ def run_iteration(iteration, model=None, verbose=False):

def _write_summary(path, header, model, tools, texts, result, elapsed, error=None):
"""Write a human-readable iteration summary."""
with open(path, "w") as f:
with open(path, "w", encoding="utf-8") as f:
f.write(f"# {header}\n\n")
f.write(f"- **Model**: {model}\n")
f.write(f"- **Duration**: {elapsed:.0f}s\n")
Expand Down Expand Up @@ -300,7 +300,7 @@ def main():
# Re-read result from jsonl for accurate cost
jsonl_path = log_path.replace(".md", ".jsonl")
if os.path.exists(jsonl_path):
with open(jsonl_path) as f:
with open(jsonl_path, encoding="utf-8") as f:
for line in f:
try:
obj = json.loads(line)
Expand Down
Loading