Skip to content

Commit 3296aaf

Browse files
committed
Organize work artifacts into threads
1 parent e32c86a commit 3296aaf

47 files changed

Lines changed: 2407 additions & 321 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

AGENTS.md

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
- `ARCHITECTURE.md`: current file structure and architectural boundaries.
3737
- `GAME_RULES.md`: implementation-aligned game mechanics and controls.
3838
- `PROGRESS.md`: single running project log.
39-
- `docs/reviews/`: multi-CLI review artifacts for substantive changes and full-codebase audits.
39+
- `docs/threads/`: active and completed work threads, including multi-CLI review artifacts and full-codebase audits.
4040

4141
## Validation Gates
4242

@@ -66,14 +66,18 @@
6666
- Review is required for changes to files such as `AGENTS.md`, `CLAUDE.md`, `ARCHITECTURE.md`, `GAME_RULES.md`, `.github/workflows/*`, `.pre-commit-config.yaml`, `pyproject.toml`, `environment.yml`, and any new review-process docs.
6767
- Review is also required for game-mechanic changes in `src/`, public API changes in `src/env.py` or `src/mediator.py`, balance/config changes in `src/config.py`, and new architectural boundaries.
6868
- Trivial typo fixes, status summaries, dependency inspection, simple setup commands, and README wording polish can skip review if they do not change behavior or process.
69-
- Store review artifacts under `docs/reviews/<scope>/<YYYY-MM-DD>/<iteration>/`:
69+
- Store active thread artifacts under `docs/threads/current/<theme>/<YYYY-MM-DD>/<iteration>/`:
7070
- `raw/codex.md`
7171
- `raw/opus.md`
7272
- optional extra independent reviewers as `raw/codex-2.md`, `raw/opus-2.md`, etc.
7373
- optional `raw/*.stdout.log` and `raw/*.stderr.log`
7474
- `diff.md`
7575
- `REVIEW.md`
76-
- Use path-limited diffs from `main`, for example `git diff -- AGENTS.md ARCHITECTURE.md docs/reviews/README.md`.
76+
- Use short kebab-case theme names. Full-codebase review threads always use `full`.
77+
- When a thread is complete, move or merge it into `docs/threads/done/<theme>/`. If that theme already exists under `done/`, move only the new date or iteration directories into the existing theme; never replace the whole theme directory.
78+
- Before choosing a new iteration number for a recurring theme, inspect both `docs/threads/current/<theme>/<YYYY-MM-DD>/` and `docs/threads/done/<theme>/<YYYY-MM-DD>/`.
79+
- Preserve `raw/` reviewer outputs verbatim. Record path migrations or follow-up context in `REVIEW.md` rather than rewriting raw reviewer text.
80+
- Use path-limited diffs from `main`, for example `git diff -- AGENTS.md ARCHITECTURE.md docs/threads/README.md`.
7781
- Reviewer prompt baseline:
7882

7983
```text
@@ -85,23 +89,23 @@ You are a senior code reviewer. Flag bugs, process regressions, stale documentat
8589

8690
## Full-Codebase Review
8791

88-
- Full-codebase review iterations live under `docs/reviews/full/<YYYY-MM-DD>/<iteration>/`.
89-
- Before starting a new iteration, inspect existing numeric iteration folders for the same date and use the next number. If earlier iterations exist, give reviewers the previous `REVIEW.md` summaries and ask them to verify that earlier findings were resolved.
92+
- Full-codebase review iterations start under `docs/threads/current/full/<YYYY-MM-DD>/<iteration>/` and move or merge into `docs/threads/done/full/<YYYY-MM-DD>/<iteration>/` when complete.
93+
- Before starting a new iteration, inspect existing numeric iteration folders for the same date under both `current/full/` and `done/full/`, then use the next number. If earlier iterations exist, give reviewers the previous `REVIEW.md` summaries and ask them to verify that earlier findings were resolved.
9094
- Run three independent reviewers. Use both Codex and Claude when available; if one service is unavailable or out of quota, run additional independent instances of the available service until there are three raw reports.
9195
- Codex full-codebase reviewer command. Keep the prompt in a file and pipe it through stdin; this avoids PowerShell splitting multi-line prompts into unexpected positional arguments. Use `--ignore-user-config` so local plugin sync or user config does not interfere with a read-only review run:
9296

9397
```powershell
94-
Get-Content -Raw docs/reviews/full/<YYYY-MM-DD>/<iteration>/prompt-codex-1.md | codex -m gpt-5.5 -c model_reasoning_effort='xhigh' -a never -s read-only exec --ignore-user-config --cd . --ephemeral -o docs/reviews/full/<YYYY-MM-DD>/<iteration>/raw/codex-1.md -
98+
Get-Content -Raw docs/threads/current/full/<YYYY-MM-DD>/<iteration>/prompt-codex-1.md | codex -m gpt-5.5 -c model_reasoning_effort='xhigh' -a never -s read-only exec --ignore-user-config --cd . --ephemeral -o docs/threads/current/full/<YYYY-MM-DD>/<iteration>/raw/codex-1.md -
9599
```
96100

97101
- Claude full-codebase reviewer command. Keep the prompt in a variable so PowerShell passes it as one argument:
98102

99103
```powershell
100-
$prompt = Get-Content -Raw docs/reviews/full/<YYYY-MM-DD>/<iteration>/prompt-claude.md
104+
$prompt = Get-Content -Raw docs/threads/current/full/<YYYY-MM-DD>/<iteration>/prompt-claude.md
101105
claude -p $prompt --model best --effort max --permission-mode bypassPermissions --no-session-persistence --tools "Read,Glob,Grep,Bash" --allowedTools "Read,Glob,Grep,Bash(git *),Bash(python -m unittest *),Bash(C:\Users\38909\miniconda3\envs\py313\python.exe -m unittest *)" --output-format text
102106
```
103107

104-
- Save raw reviewer output under `raw/`, then synthesize `REVIEW.md` with severity, evidence, disposition, and a fix plan. Only fix findings after checking them against the codebase. Re-review fixes in the next iteration if code changes are made.
108+
- Save raw reviewer output under `raw/`, then synthesize `REVIEW.md` with severity, evidence, disposition, and a fix plan. Only fix findings after checking them against the codebase. Re-review fixes in the next iteration if code changes are made. When the full review is complete, move or merge the thread into `docs/threads/done/full/`.
105109

106110
## Visual Changes
107111

ARCHITECTURE.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,14 @@ python_mini_metro/
55
|- .vscode/
66
| \- settings.json
77
|- docs/
8-
| \- reviews/
8+
| \- threads/
99
| |- README.md
10-
| |- agents-repo-fit/
11-
| \- full/
10+
| |- current/
11+
| | \- README.md
12+
| \- done/
13+
| |- README.md
14+
| |- agents-repo-fit/
15+
| \- full/
1216
|- src/
1317
| |- agent_play.py
1418
| |- config.py

PROGRESS.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,5 +81,6 @@
8181
## 2026-04-28
8282

8383
- Added Python/py313 workflow guidance in `AGENTS.md` with a `CLAUDE.md` shim, reflected the removed `.cursor/rules`, and added an initial review artifact directory.
84-
- Moved review artifacts under `docs/reviews/` and documented robust full-codebase Codex/Claude review commands.
84+
- Moved review artifacts under the docs thread area and documented robust full-codebase Codex/Claude review commands.
8585
- Ran the first full-codebase review, fixed terminal-state API mutation, malformed action handling, loop routing closure, stale travel-plan cleanup, the graph node hash contract, and the stale Ruff pre-commit hook, then added focused regressions.
86+
- Renamed review artifacts into the broader `docs/threads/` lifecycle, with active work in `current/`, completed work in `done/`, and completed `full` and `agents-repo-fit` themes migrated under `done/`.

docs/reviews/README.md

Lines changed: 0 additions & 17 deletions
This file was deleted.

docs/threads/README.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Threads
2+
3+
This directory stores work threads. A thread is the durable record for one coherent piece of work, named by theme.
4+
5+
Threads start under `current/` while work is active and move to `done/` when the work is complete. If a completed theme already exists under `done/`, merge the new date or iteration directories into that theme instead of replacing the whole theme directory.
6+
7+
Use short kebab-case theme names, such as `agents-repo-fit`, `thread-structure`, or `metro-dwell-fix`. Full-codebase review work always uses the theme name `full`.
8+
9+
Preserve `raw/` reviewer outputs verbatim. If a folder migration changes where a thread lives, document that migration in `REVIEW.md` or another non-raw note instead of rewriting the original reviewer text.
10+
11+
Use this layout for thread artifacts:
12+
13+
```text
14+
docs/threads/current/<theme>/<YYYY-MM-DD>/<iteration>/
15+
|- raw/
16+
| |- codex-1.md
17+
| |- opus.md
18+
| \- codex-2.md
19+
|- diff.md
20+
\- REVIEW.md
21+
```
22+
23+
When the thread is complete, move or merge that date/iteration tree to:
24+
25+
```text
26+
docs/threads/done/<theme>/<YYYY-MM-DD>/<iteration>/
27+
```
28+
29+
Start iteration numbering at `1` and increment it only when a re-review or revised artifact set is needed after addressing findings. For recurring themes, inspect both `current/<theme>/` and `done/<theme>/` before choosing the next date or iteration number.

docs/threads/current/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Current Threads
2+
3+
Active work threads live here while they are in progress.
4+
5+
Use `docs/threads/current/<theme>/<YYYY-MM-DD>/<iteration>/` for review artifacts, notes, diffs, and raw reviewer output that belong to the active thread. When the work is complete, move or merge the thread into `docs/threads/done/<theme>/`.

docs/threads/done/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Done Threads
2+
3+
Completed work threads live here.
4+
5+
If a theme already exists, add the new date or iteration directories under the existing theme. Do not replace an existing theme directory just because a new thread shares the same name.

docs/reviews/agents-repo-fit/2026-04-28/1/REVIEW.md renamed to docs/threads/done/agents-repo-fit/2026-04-28/1/REVIEW.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@
33
## Scope
44

55
- Rewrote `AGENTS.md` from a copied workflow template into a Python/py313 workflow for this repo.
6-
- Added `docs/reviews/README.md` so the review artifact directory referenced by `AGENTS.md` exists in the repo.
7-
- Updated `ARCHITECTURE.md` after the user removed `.cursor/rules` and this change added `docs/reviews/`.
6+
- Added `docs/threads/README.md` so the review artifact directory referenced by `AGENTS.md` exists in the repo.
7+
- Updated `ARCHITECTURE.md` after the user removed `.cursor/rules` and this change added `docs/threads/done/`.
88
- Updated `PROGRESS.md` with a short entry for the process-documentation change.
99

1010
## Validation
1111

1212
- `C:\Users\38909\miniconda3\envs\py313\python.exe -m unittest -v`: passed, 167 tests.
13-
- `C:\Users\38909\miniconda3\envs\py313\python.exe -m pre_commit run --files AGENTS.md ARCHITECTURE.md CLAUDE.md PROGRESS.md docs/reviews/README.md docs/reviews/agents-repo-fit/2026-04-28/1/diff.md docs/reviews/agents-repo-fit/2026-04-28/1/REVIEW.md docs/reviews/agents-repo-fit/2026-04-28/1/raw/codex.md docs/reviews/agents-repo-fit/2026-04-28/1/raw/opus.md`: passed after adding a final newline to `CLAUDE.md`.
14-
- `git diff --check -- AGENTS.md ARCHITECTURE.md PROGRESS.md docs/reviews/README.md docs/reviews/agents-repo-fit/2026-04-28/1`: passed, with expected CRLF warnings only.
13+
- `C:\Users\38909\miniconda3\envs\py313\python.exe -m pre_commit run --files AGENTS.md ARCHITECTURE.md CLAUDE.md PROGRESS.md docs/threads/README.md docs/threads/done/agents-repo-fit/2026-04-28/1/diff.md docs/threads/done/agents-repo-fit/2026-04-28/1/REVIEW.md docs/threads/done/agents-repo-fit/2026-04-28/1/raw/codex.md docs/threads/done/agents-repo-fit/2026-04-28/1/raw/opus.md`: passed after adding a final newline to `CLAUDE.md`.
14+
- `git diff --check -- AGENTS.md ARCHITECTURE.md PROGRESS.md docs/threads/README.md docs/threads/done/agents-repo-fit/2026-04-28/1`: passed, with expected CRLF warnings only.
1515

1616
## Codex Findings
1717

@@ -21,7 +21,7 @@
2121
## Claude Findings
2222

2323
- P2: `PROGRESS.md` and the review artifact path use `2026-04-28`, while the reviewer inferred April 27, 2026 from local session context. Disposition: not accepted for the same reason as the Codex date finding.
24-
- P2: The `PROGRESS.md` bullet under-described the actual process change. Disposition: accepted. The bullet now names `AGENTS.md`, `CLAUDE.md`, the removed `.cursor/rules`, and `docs/reviews/`.
24+
- P2: The `PROGRESS.md` bullet under-described the actual process change. Disposition: accepted. The bullet now names `AGENTS.md`, `CLAUDE.md`, the removed `.cursor/rules`, and `docs/threads/done/`.
2525
- P3: The review packet should include the `.cursor/rules` deletion and `CLAUDE.md` addition. Disposition: accepted. `diff.md` was regenerated with those paths included.
2626

2727
## Result

docs/reviews/agents-repo-fit/2026-04-28/1/diff.md renamed to docs/threads/done/agents-repo-fit/2026-04-28/1/diff.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ index 0000000..bf60f17
104104
+- `ARCHITECTURE.md`: current file structure and architectural boundaries.
105105
+- `GAME_RULES.md`: implementation-aligned game mechanics and controls.
106106
+- `PROGRESS.md`: single running project log.
107-
+- `reviews/`: multi-CLI review artifacts for substantive changes.
107+
+- `docs/threads/done/`: multi-CLI review artifacts for substantive changes.
108108
+
109109
+## Validation Gates
110110
+
@@ -134,13 +134,13 @@ index 0000000..bf60f17
134134
+- Review is required for changes to files such as `AGENTS.md`, `CLAUDE.md`, `ARCHITECTURE.md`, `GAME_RULES.md`, `.github/workflows/*`, `.pre-commit-config.yaml`, `pyproject.toml`, `environment.yml`, and any new review-process docs.
135135
+- Review is also required for game-mechanic changes in `src/`, public API changes in `src/env.py` or `src/mediator.py`, balance/config changes in `src/config.py`, and new architectural boundaries.
136136
+- Trivial typo fixes, status summaries, dependency inspection, simple setup commands, and README wording polish can skip review if they do not change behavior or process.
137-
+- Store review artifacts under `reviews/<scope>/<YYYY-MM-DD>/<iteration>/`:
137+
+- Store review artifacts under `docs/threads/current/<theme>/<YYYY-MM-DD>/<iteration>/`:
138138
+ - `raw/codex.md`
139139
+ - `raw/opus.md`
140140
+ - optional `raw/*.stdout.log` and `raw/*.stderr.log`
141141
+ - `diff.md`
142142
+ - `REVIEW.md`
143-
+- Use path-limited diffs from `main`, for example `git diff -- AGENTS.md ARCHITECTURE.md reviews/README.md`.
143+
+- Use path-limited diffs from `main`, for example `git diff -- AGENTS.md ARCHITECTURE.md docs/threads/README.md`.
144144
+- Reviewer prompt baseline:
145145
+
146146
+```text
@@ -186,7 +186,7 @@ index e678939..a6b66ef 100644
186186
| \- test.yml
187187
+|- .vscode/
188188
+| \- settings.json
189-
+|- reviews/
189+
+|- docs/threads/done/
190190
+| \- README.md
191191
|- src/
192192
| |- agent_play.py
@@ -219,12 +219,12 @@ index d858993..b3879b3 100644
219219
+
220220
+## 2026-04-28
221221
+
222-
+- Added Python/py313 workflow guidance in `AGENTS.md` with a `CLAUDE.md` shim, reflected the removed `.cursor/rules`, and added a `reviews/` artifact directory.
223-
diff --git a/reviews/README.md b/reviews/README.md
222+
+- Added Python/py313 workflow guidance in `AGENTS.md` with a `CLAUDE.md` shim, reflected the removed `.cursor/rules`, and added a `docs/threads/done/` artifact directory.
223+
diff --git a/docs/threads/README.md b/docs/threads/README.md
224224
new file mode 100644
225225
index 0000000..d5d2eef
226226
--- /dev/null
227-
+++ b/reviews/README.md
227+
+++ b/docs/threads/README.md
228228
@@ -0,0 +1,16 @@
229229
+# Reviews
230230
+
@@ -233,7 +233,7 @@ index 0000000..d5d2eef
233233
+Use this layout:
234234
+
235235
+```text
236-
+reviews/<scope>/<YYYY-MM-DD>/<iteration>/
236+
+docs/threads/current/<theme>/<YYYY-MM-DD>/<iteration>/
237237
+|- raw/
238238
+| |- codex.md
239239
+| \- opus.md

docs/reviews/agents-repo-fit/2026-04-28/1/raw/codex.md renamed to docs/threads/done/agents-repo-fit/2026-04-28/1/raw/codex.md

File renamed without changes.

0 commit comments

Comments
 (0)