Commit d745bfa
authored
feat(ci): issue auto-implement action and workflow (#238)
* feat(ci): add issue auto-implement action and workflow
- Add workflow issue-auto-implement.yml (label, comment, PR review triggers)
- Add composite action: team check, labels, assess script, implement placeholder, verify loop, create PR
- Add assess script (TypeScript/tsx, Claude, fixtures) with vitest tests
- Add workflow issue-auto-implement-test.yml to run assess tests on PR
- Add README (usage, inputs, testing) and AGENTS.md (flows, verification, next steps)
- Use AUTO_IMPLEMENT_* prefix for secrets/vars; require github_allowed_trigger_team
Made-with: Cursor
* feat(ci): pass context_files into assess and include in Claude prompt
- Add CONTEXT_FILES and GITHUB_WORKSPACE to assess step env
- Load repo files (AGENTS.md, REFERENCE.md, etc.) and append to assessment prompt
- Skip missing files; REPO_ROOT from GITHUB_WORKSPACE or cwd for local runs
Made-with: Cursor
* feat(ci): fetch all issue comments for assessment
- For issues and issue_comment events, call GitHub API for issue comments
- Include all comments in Claude prompt (author, date, body)
- Fall back to payload comment/comments when API not used
Made-with: Cursor
* fix(ci): stabilize issue-auto-implement assess tests workflow
- Set GITHUB_WORKSPACE in job env so assess script has repo root in CI
- Use working-directory instead of cd for install/test step
- Add npm cache keyed by assess package-lock.json
Made-with: Cursor
* fix(ci): do not run main() when assess script is loaded by Vitest
In CI the runner sets GITHUB_EVENT_PATH, so the script was invoking main()
on import; loadPayload() then threw and process.exit(1) caused Vitest to
fail with an unhandled error. Only run main() when GITHUB_EVENT_PATH is
set and VITEST is not (i.e. when invoked as script, not by tests).
Made-with: Cursor
* feat(ci): wire Claude implement step and commit-and-push
- Add assess/implement.ts: fetch issue, call Claude for edits JSON, apply files, write commit message
- Action: run implement script with env; commit and push using generated commit message
- Add .gitignore for .commit_msg; document implement script in AGENTS.md
Made-with: Cursor
* feat(ci): true implement-verify loop with PREVIOUS_VERIFY_OUTPUT
- Implement script accepts PREVIOUS_VERIFY_OUTPUT and adds it to Claude prompt on retry
- Single step loops: implement → commit/push → verify; on verify failure retry with output
- Create PR uses implement_verify_loop.outcome; document loop in AGENTS.md
Made-with: Cursor
* refactor(issue-auto-implement): move assess into src/ and test/
- Main code: assess/src/ (index.ts, implement.ts, normalize.ts)
- Tests: assess/test/ (index.test.ts, normalize.test.ts)
- Fixtures stay at assess/fixtures/
- Update package.json scripts and action.yml to use src/
- Add .env.example, setup-local-env.sh, .gitignore .env; update README/AGENTS paths
Made-with: Cursor
* refactor(issue-auto-implement): consolidate tests under test/ (unit, integration, fixtures)
- test/unit/ — unit tests (npm test), no API
- test/integration/ — Claude API tests (npm run test:integration), not in CI
- test/fixtures/ — shared event JSONs for both and assess:fixture script
- Remove top-level fixtures/ and test-integration/; update vitest configs and paths
Made-with: Cursor
* chore: ignore auto-implement worktrees
Made-with: Cursor
* fix(issue-auto-implement): use Claude Code CLI only, single API key
- Implement runs only Claude Code CLI (no API path); pass AUTO_IMPLEMENT_ANTHROPIC_API_KEY to CLI
- Assess uses only AUTO_IMPLEMENT_ANTHROPIC_API_KEY
- Action installs Claude Code CLI in CI when assess outcome is implement
- README: add CI/CD checklist; docs for implement and env
- AGENTS.md: implement flow and backlog updated
Made-with: Cursor
* fix(issue-auto-implement): create new PR when previous closed; TS push-and-open-pr
- push-and-open-pr.ts: check gh pr view --json state; only skip create when OPEN
- run-local-assess.ts: worktree flow, calls pushAndOpenPr, default context
- load-dotenv.ts: used by run-local-assess
- scripts/push-and-open-pr.sh: optional standalone script
Made-with: Cursor
* docs(issue-auto-implement): quick start, remove TEST_PLAN refs, add assess:local
- README: add How to use (workflow, secrets, trigger label, trigger)
- Remove TEST_PLAN.md references from README and AGENTS.md
- package.json: add assess:local script
Made-with: Cursor1 parent 5e323d8 commit d745bfa
27 files changed
Lines changed: 4235 additions & 0 deletions
File tree
- .github
- actions/issue-auto-implement
- assess
- src
- test
- fixtures
- integration
- unit
- scripts
- workflows
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
0 commit comments