|
1 | | -You are building the open-source project `thinktank` — an ensemble AI coding tool. Each iteration of this loop should close ONE issue via a proper PR workflow. |
| 1 | +You are building the open-source project thinktank. Each iteration: close ONE issue via thinktank + proper PR workflow. |
2 | 2 |
|
3 | | -IMPORTANT: Use thinktank itself to generate code. Run `npx tsx src/cli.ts run "<task prompt>" -n 5 -t "npm test"` and then `npx tsx src/cli.ts apply` to apply the best result. If agents time out, that's fine — pick from the ones that succeeded. |
| 3 | +## Issues to close (in order) |
| 4 | +1. #122 — Support Amazon Bedrock model IDs |
| 5 | +2. #69 — Schema validation for result files |
| 6 | +3. #64 — Pre-flight test run on main branch |
| 7 | +4. #57 — Show live per-agent progress |
| 8 | +5. #79 — Integration tests for CLI commands |
4 | 9 |
|
5 | | -## Process for EACH iteration |
6 | | - |
7 | | -### Step 1: Assess current state |
8 | | -- Run `gh issue list --state open --limit 30` to see outstanding issues |
9 | | -- Run `git log --oneline -5` to see recent work |
10 | | -- Run `git checkout main && git pull` to ensure you're on latest main |
11 | | -- Pick the highest-priority open issue. Priority order: |
12 | | - 1. Bugs (#59, #60, #66, #68) |
13 | | - 2. Robustness (#54, #63, #69) |
14 | | - 3. High-value UX (#57, #62, #77, #81) |
15 | | - 4. Features and everything else |
16 | | - |
17 | | -### Step 2: Create a branch and use thinktank |
18 | | -- `git checkout -b issue-N-short-description` |
19 | | -- Run thinktank with 5 agents and NO timeout override (use default 300s): |
20 | | - `npx tsx src/cli.ts run "<detailed task prompt referencing files and conventions>" -n 5 -t "npm test"` |
21 | | -- Review the results: `npx tsx src/cli.ts list` |
22 | | -- Preview the recommended agent: `npx tsx src/cli.ts apply --preview` |
23 | | -- If it looks good, apply: `npx tsx src/cli.ts apply` |
24 | | -- If no agent succeeded or the code needs adjustment, implement manually |
25 | | - |
26 | | -### Step 3: Verify and fix up |
27 | | -- Run `npx tsc --noEmit` to verify types |
28 | | -- Run `npm test` to verify all tests pass |
29 | | -- Run `npm run lint` to verify lint passes (auto-fix with `npx biome check --write src/`) |
30 | | -- If thinktank's output needs minor adjustments, make them manually |
31 | | - |
32 | | -### Step 4: Commit and push |
33 | | -- Stage only relevant files (not .claude/ or .thinktank/) |
34 | | -- Commit with message referencing the issue |
35 | | -- Push with `-u origin branch-name` |
| 10 | +Skip: #108, #105, #31 (abstract/human-judgment needed) |
36 | 11 |
|
37 | | -### Step 5: Create PR with proper template |
38 | | -Use `gh pr create` with: Summary, Change type, Related issue (Closes #N), How to test, Breaking changes. |
39 | | - |
40 | | -### Step 6: Self-review |
41 | | -- Add a review comment noting what you verified |
42 | | -- Note whether the code was generated by thinktank (dogfooding!) |
43 | | - |
44 | | -### Step 7: Merge and clean up |
45 | | -- `gh pr merge <number> --squash --delete-branch` |
46 | | -- `git checkout main && git pull` |
47 | | - |
48 | | -### Step 8: Comment on the closed issue |
49 | | -- `gh issue comment N --body "Fixed in #PR. Summary of what changed."` |
| 12 | +## Process for EACH iteration |
50 | 13 |
|
51 | | -### Step 9: File new issues if needed |
| 14 | +### Step 1: git checkout main && git pull |
| 15 | +### Step 2: git checkout -b issue-N-description |
| 16 | +### Step 3: Write prompt to .thinktank/prompt.txt |
| 17 | +### Step 4: Run thinktank |
| 18 | +npx tsx src/cli.ts run --attempts 5 --model opus -t "npm test" -f .thinktank/prompt.txt |
| 19 | +### Step 5: Review results, apply best agent |
| 20 | +git stash && npx tsx src/cli.ts apply && git stash pop |
| 21 | +### Step 6: Verify |
| 22 | +npx tsc --noEmit && npm test && npx biome check --write src/ && npm run lint |
| 23 | +### Step 7: Commit, push, create PR |
| 24 | +### Step 8: Wait for CI: gh pr checks N --watch |
| 25 | +### Step 9: Merge: gh pr merge N --squash --delete-branch |
| 26 | +### Step 10: Close issue with comment: gh issue comment N --body "Fixed in #PR..." |
| 27 | +### Step 11: Return to main: git checkout main && git pull |
52 | 28 |
|
53 | 29 | ## Quality standards |
54 | | -- TypeScript strict mode, no `any` |
55 | | -- All tests must pass before PR |
56 | | -- Lint must pass before PR |
57 | | -- Error messages must be actionable |
58 | | -- Keep functions small and focused |
59 | | -- Add tests for new code paths |
| 30 | +- All tests must pass, lint must pass before PR |
| 31 | +- Add tests for new code |
| 32 | +- Follow existing conventions |
0 commit comments