Skip to content
Merged
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
2 changes: 1 addition & 1 deletion .github/workflows/eval.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ jobs:
# suite exists for): the CLI as a devDependency, its verification
# policy line in AGENTS.md, and the skill from honojs/skills.
git clone --depth 1 https://github.com/honojs/skills /tmp/hono-skills
for task in build-endpoints build-shop session-users refactor-routes fix-404 fix-404-shadow; do
for task in build-endpoints build-endpoints-workers build-shop session-users refactor-routes fix-404 fix-404-shadow; do
echo "::group::practical $task baseline"
node packages/agent-dx/dist/cli.js \
--suite practical \
Expand Down
1 change: 1 addition & 0 deletions README.ja.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ pnpm build
| `--task` | fixture | 依頼する変更 |
| ------------------------------- | ---------------- | ------------------------------------------------------------------------------------------------------- |
| `build-endpoints`(デフォルト) | `hono-fresh` | ゼロからusers CRUDを作り、実際に動くことを確認する |
| `build-endpoints-workers` | `hono-workers` | 同じ users CRUD を、`npm run dev` で `wrangler dev` が立つ素の create-hono Workers プロジェクトで |
| `build-shop` | `hono-fresh` | プロンプトに実行可能な受け入れ仕様(`expect` 付きのリクエスト行)を添えて、ゼロからショップ API を作る |
| `session-users` | `hono-fresh` | 1 つの会話で 4 回の変更依頼。最終状態がすべてのステップの契約を満たしていなければならない |
| `refactor-routes` | `hono-shop-flat` | 肥大化した単一ファイルアプリ(27 ルート、shadowing しやすい兄弟ルート、大きな一覧)を挙動を変えずに分割 |
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ Run `agent-dx --list` for the up-to-date list. As of v0:
| `--task` | Fixture | Change requested |
| --------------------------- | ---------------- | ---------------------------------------------------------------------------------------------------------------------- |
| `build-endpoints` (default) | `hono-fresh` | Build a users CRUD from scratch and make sure it works |
| `build-endpoints-workers` | `hono-workers` | The same users CRUD on a stock create-hono Workers project, where `npm run dev` starts `wrangler dev` |
| `build-shop` | `hono-fresh` | Build a shop API from scratch against an executable acceptance spec (request lines with `expect`) in the prompt |
| `session-users` | `hono-fresh` | Four change requests in one conversation; the final state must honor every step's contract |
| `refactor-routes` | `hono-shop-flat` | Split a bloated single-file app (27 routes, shadow-prone siblings, large lists) into routers without changing behavior |
Expand Down
1 change: 1 addition & 0 deletions apps/web/src/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -656,6 +656,7 @@ const MODEL_ORDER = ['claude-haiku-4-5', 'claude-sonnet-5', 'claude-opus-5']
// Build → evolve → refactor → debug: the order tasks are listed in the CLI.
const TASK_ORDER = [
'build-endpoints',
'build-endpoints-workers',
'build-shop',
'session-users',
'refactor-routes',
Expand Down
21 changes: 21 additions & 0 deletions packages/agent-dx/fixtures/hono-workers/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
```txt
npm install
npm run dev
```

```txt
npm run deploy
```

[For generating/synchronizing types based on your Worker configuration run](https://developers.cloudflare.com/workers/wrangler/commands/#types):

```txt
npm run cf-typegen
```

Pass the `CloudflareBindings` as generics when instantiating `Hono`:

```ts
// src/index.ts
const app = new Hono<{ Bindings: CloudflareBindings }>()
```
16 changes: 16 additions & 0 deletions packages/agent-dx/fixtures/hono-workers/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"name": "hono-workers",
"type": "module",
"scripts": {
"dev": "wrangler dev",
"deploy": "wrangler deploy --minify",
"cf-typegen": "wrangler types --env-interface CloudflareBindings"
},
"dependencies": {
"hono": "^4.13.7"
},
"devDependencies": {
"wrangler": "^4.110.0",
"typescript": "^5.9.3"
}
}
9 changes: 9 additions & 0 deletions packages/agent-dx/fixtures/hono-workers/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { Hono } from 'hono'

const app = new Hono()

app.get('/', (c) => {
return c.text('Hello Hono!')
})

export default app
12 changes: 12 additions & 0 deletions packages/agent-dx/fixtures/hono-workers/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"compilerOptions": {
"target": "ESNext",
"module": "ESNext",
"moduleResolution": "Bundler",
"strict": true,
"skipLibCheck": true,
"lib": ["ESNext"],
"jsx": "react-jsx",
"jsxImportSource": "hono/jsx"
}
}
38 changes: 38 additions & 0 deletions packages/agent-dx/fixtures/hono-workers/wrangler.jsonc
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"$schema": "node_modules/wrangler/config-schema.json",
"name": "hono-workers",
"main": "src/index.ts",
"compatibility_date": "2026-09-08",
// "compatibility_flags": [
// "nodejs_compat"
// ],
// "vars": {
// "MY_VAR": "my-variable"
// },
// "kv_namespaces": [
// {
// "binding": "MY_KV_NAMESPACE",
// "id": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
// }
// ],
// "r2_buckets": [
// {
// "binding": "MY_BUCKET",
// "bucket_name": "my-bucket"
// }
// ],
// "d1_databases": [
// {
// "binding": "MY_DB",
// "database_name": "my-database",
// "database_id": ""
// }
// ],
// "ai": {
// "binding": "AI"
// },
// "observability": {
// "enabled": true,
// "head_sampling_rate": 1
// }
}
2 changes: 2 additions & 0 deletions packages/agent-dx/src/suites/practical/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { TOOL_VERSION } from '../../version.js'
import { createWorkspaceFrom, persistWorkspace, removeWorkspace } from '../../workspace.js'
import type { PracticalTask } from './task.js'
import { buildEndpointsTask } from './tasks/build-endpoints.js'
import { buildEndpointsWorkersTask } from './tasks/build-endpoints-workers.js'
import { buildShopTask } from './tasks/build-shop.js'
import { fix404Task } from './tasks/fix-404.js'
import { fix404ShadowTask } from './tasks/fix-404-shadow.js'
Expand All @@ -29,6 +30,7 @@ import { sessionUsersTask } from './tasks/session-users.js'

export const PRACTICAL_TASKS: Record<string, PracticalTask> = {
[buildEndpointsTask.id]: buildEndpointsTask,
[buildEndpointsWorkersTask.id]: buildEndpointsWorkersTask,
[buildShopTask.id]: buildShopTask,
[sessionUsersTask.id]: sessionUsersTask,
[refactorRoutesTask.id]: refactorRoutesTask,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import type { PracticalTask } from '../task.js'
import { buildEndpointsTask } from './build-endpoints.js'

/**
* Task: the same users CRUD, on a stock create-hono Cloudflare Workers
* project — `npm run dev` starts `wrangler dev`, there is no typecheck
* script and no AGENTS.md. Every other fixture has no dev server, so the
* failure mode the Hono CLI was built for (the agent starts a server in
* the foreground to verify and never gets its shell back) cannot happen
* there. Here it can. Note for local runs: agents may `pkill -f wrangler`.
*/
export const buildEndpointsWorkersTask: PracticalTask = {
...buildEndpointsTask,
id: 'build-endpoints-workers',
description: 'Build a users CRUD on a stock create-hono Workers project (wrangler dev available)',
fixture: 'hono-workers',
}
Loading