forked from Weihong-Liu/GenericAgent_project
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtasks.json
More file actions
2226 lines (2226 loc) · 75.6 KB
/
Copy pathtasks.json
File metadata and controls
2226 lines (2226 loc) · 75.6 KB
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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
{
"project": {
"name": "GenericAgent Engineered",
"root": "ga_engineered",
"language": "python",
"environment_manager": "uv",
"status": "release_track_complete",
"created_at": "2026-04-24",
"goal": "从 0 到 1 工程化重构 GenericAgent,保留自进化 Agent 核心,补齐 provider、auth、CLI、命令、状态、测试和发布工程能力。"
},
"references": {
"generic_agent": [
"GenericAgent/agentmain.py",
"GenericAgent/agent_loop.py",
"GenericAgent/ga.py",
"GenericAgent/llmcore.py",
"GenericAgent/TMWebDriver.py",
"GenericAgent/memory"
],
"free_code_patterns": [
"free-code/src/entrypoints/cli.tsx: fast-path CLI bootstrap, dynamic command loading, feature gates",
"free-code/src/commands.ts: central command registry, dynamic skill/plugin commands, availability filtering",
"free-code/src/query.ts: query loop, tool orchestration, compaction, stop hooks, token budget",
"free-code/src/tools/*: command/tool split and UI rendering per tool"
],
"hermes_agent_patterns": [
"hermes-agent/hermes_cli/main.py: profile/env pre-parse, setup/doctor/status command style",
"hermes-agent/hermes_cli/auth.py: provider registry, OAuth/API-key auth store, OpenAI Codex OAuth pattern",
"hermes-agent/hermes_cli/providers.py: provider overlays, aliases, transport definitions",
"hermes-agent/hermes_cli/commands.py: Python slash command registry and autocomplete metadata",
"hermes-agent/hermes_state.py: SQLite session store with WAL/FTS design",
"hermes-agent/hermes_cli/banner.py: Rich/prompt-toolkit CLI presentation"
]
},
"engineering_policy": {
"branching": "每个 milestone 可单独分支;小步提交;commit message 遵循 AGENTS.md Lore Commit Protocol。",
"testing": "每个功能任务必须新增或更新单元测试;单元测试先于集成测试;外部 API/OAuth 使用 mock。",
"quality_gates": [
"uv sync --extra dev",
"uv run python -m unittest discover -s tests",
"uv run pytest",
"uv run ruff check .",
"uv run mypy src"
],
"definition_of_done": [
"代码合入新工程目录,不破坏旧 GenericAgent",
"功能具备单元测试",
"文档更新",
"tasks/ 目录下任务报告更新",
"git commit 完成"
]
},
"configuration_policy": {
"style": "参考 free-code 的 JSON settings 分层配置模式。",
"project_config_dir": ".generic-agent",
"project_settings": ".generic-agent/settings.json",
"global_config_home_env": "GENERIC_AGENT_CONFIG_DIR",
"global_config_home_env_aliases": [
"GA_CONFIG_DIR",
"GENERIC_AGENT_HOME",
"CLAUDE_CONFIG_DIR"
],
"global_settings": "$GENERIC_AGENT_CONFIG_DIR/settings.json",
"legacy_project_config_compatibility": [
".generic-agent.json",
".generic-agent.yaml",
".generic-agent.yml"
],
"rules": [
"后续项目级配置相关文件统一放在 .generic-agent/ 目录下。",
"后续全局配置相关文件统一放在 $GENERIC_AGENT_CONFIG_DIR/ 目录下;GENERIC_AGENT_HOME 仅作为旧别名兼容。",
"不要新增散落在项目根目录的配置文件;如需兼容旧路径,只能作为读取回退。"
]
},
"reporting_policy": {
"task_report_dir": "tasks",
"current_task_report": "tasks/TASK_REPORT.md",
"rules": [
"任务报告、阶段报告和交付报告统一放在 tasks/ 目录下。",
"根目录只保留 tasks.json 作为计划索引。"
]
},
"assumptions": [
"新工程放在当前工作区根目录 ga_engineered,并作为独立 git 仓库开发。",
"旧 GenericAgent 暂不删除,先作为行为参考和迁移源。",
"OpenAI OAuth/Codex OAuth 先以 PKCE、loopback callback、mocked token exchange 和 AuthStore refresh 起步,再接入真实浏览器联调。",
"M4 已用 Rich + prompt-toolkit 完成基础 TUI;该 TUI 在 M9 中会被彻底删除,由 TypeScript/Ink 前端(ui-tui/)通过 stdio JSON-RPC gateway 调用 Python 后端唯一承担 TUI 层。M7(Textual)与 M8(可选 TS 原型)已被 M9 superseded。",
"Provider 抽象优先支持 OpenAI Responses、OpenAI Chat-Compatible、Anthropic Messages、Codex OAuth 四类 transport。",
"后续配置文件分为项目级 .generic-agent/settings.json 和全局 $GENERIC_AGENT_CONFIG_DIR/settings.json 两层,默认目录为 ~/.generic-agent。",
"OpenAI Codex OAuth 的 CLI 登录需要同时支持有头浏览器授权和无头授权;无头模式不自动打开浏览器,只输出授权 URL 并等待或接收 callback/code。"
],
"milestones": [
{
"id": "M0",
"name": "Foundation",
"objective": "建立独立 uv 工程、基础架构、任务计划和单元测试起点。",
"status": "done"
},
{
"id": "M1",
"name": "Provider and Auth Layer",
"objective": "抽象多 LLM provider、环境变量、API key、OAuth 与 token refresh。",
"status": "done"
},
{
"id": "M2",
"name": "Agent Runtime",
"objective": "重建可测试的 Agent loop、message model、tool call dispatch、history compaction。",
"status": "done"
},
{
"id": "M3",
"name": "Tool Runtime",
"objective": "工程化文件、shell、浏览器、记忆、skill 等工具,并加入权限与输出预算。",
"status": "done"
},
{
"id": "M4",
"name": "CLI and Slash Commands",
"objective": "实现高质量 CLI/TUI、命令注册、补全、动效、状态栏、快捷命令。",
"status": "done"
},
{
"id": "M5",
"name": "State, Memory, and Sessions",
"objective": "引入 SQLite session store、FTS 搜索、checkpoint、memory index。",
"status": "done"
},
{
"id": "M6",
"name": "Migration and Release",
"objective": "从旧 GenericAgent 迁移行为、补齐集成测试、打包发布和报告。",
"status": "done"
},
{
"id": "M7",
"name": "Advanced TUI Experience",
"objective": "重做类 hermes-agent/free-code 的高级终端界面,支持默认进入 TUI、欢迎页、实时工具/命令事件、命令面板和后端事件协议。",
"status": "superseded",
"superseded_by": "M9",
"supersede_reason": "用户决定彻底删除 Python TUI(Rich/prompt-toolkit + Textual 计划),改由 TypeScript/Ink 前端唯一承担 TUI 层。"
},
{
"id": "M8",
"name": "Optional TypeScript TUI Frontend",
"objective": "在 Python runtime protocol 稳定后评估并原型化 TS/Ink 前端,保持 Python 后端为唯一 agent runtime。",
"status": "superseded",
"superseded_by": "M9",
"supersede_reason": "TS/Ink 前端从可选原型升级为唯一前端,相关任务并入 M9。"
},
{
"id": "M9",
"name": "TypeScript TUI Primary Frontend",
"objective": "用 TypeScript/Ink 重做 TUI 作为唯一前端,删除 Python prompt-toolkit TUI 与 Textual 计划;Python 后端通过 stdio JSON-RPC gateway 提供 runtime;GenericAgent / ga / gae 入口默认进入 TS TUI。",
"status": "done",
"supersedes": [
"M7",
"M8"
]
},
{
"id": "M10",
"name": "Free-code-style Interactivity",
"objective": "对标 free-code (Claude Code) 把 TUI 输入/transcript/工具/快捷键交互全面提升:多行输入 + 历史回放 + Ctrl-R 搜索、bash + @file 模式前缀、Vim 模式、流式节流、Markdown 渲染、工具结果折叠、Shift-↑ 消息导航、工具审批提示、快捷键全集 + 通知 + 帮助页。",
"status": "done"
},
{
"id": "M11",
"name": "Free-code TUI Full Parity Migration",
"objective": "全量扫描 free-code TUI,把 ga_engineered 尚未迁移的提示输入、消息面板、工具渲染、命令/设置、权限/沙箱、会话/任务、MCP/插件/Agent/Hooks、状态通知和外部集成功能按任务队列逐项迁移,并在每个任务后完成验证、任务报告和 git 提交。",
"status": "done"
},
{
"id": "M12",
"name": "Free-code TUI Parity Corrections",
"objective": "根据真实使用反馈修正 M11 后仍存在的 free-code TUI parity 缺口:Bash 折叠输出、完成耗时、slash command 显式覆盖和 hooks 状态披露。",
"status": "done"
},
{
"id": "M13",
"name": "Free-code-style Config Home Parity",
"objective": "参考 free-code 的 CLAUDE_CONFIG_DIR 与 ~/.claude 运行时目录布局,为 GenericAgent Engineered 补齐可覆盖的 .generic-agent 配置目录、标准状态目录和文档。",
"status": "done"
}
],
"tasks": [
{
"id": "GAE-001",
"milestone": "M0",
"title": "创建 uv Python 工程骨架",
"status": "done",
"priority": "P0",
"deliverables": [
"pyproject.toml",
"src/generic_agent_engineered",
"tests",
"README.md"
],
"acceptance_criteria": [
"工程可被 uv 识别",
"定义 gae console script",
"源码采用 src layout"
],
"unit_tests": [
"tests/test_config.py",
"tests/test_commands.py",
"tests/test_providers.py",
"tests/test_auth_store.py"
],
"dependencies": []
},
{
"id": "GAE-002",
"milestone": "M0",
"title": "建立架构文档与开发计划",
"status": "done",
"priority": "P0",
"deliverables": [
"docs/ARCHITECTURE.md",
"tasks.json",
"tasks/TASK_REPORT.md"
],
"acceptance_criteria": [
"tasks.json 为合法 JSON",
"每个计划功能包含验收标准和测试要求",
"文档明确新旧运行时边界"
],
"unit_tests": [
"JSON 解析校验"
],
"dependencies": [
"GAE-001"
]
},
{
"id": "GAE-003",
"milestone": "M1",
"title": "实现 ProviderSpec 与 ProviderRegistry",
"status": "done",
"priority": "P0",
"deliverables": [
"providers/base.py",
"providers/registry.py"
],
"acceptance_criteria": [
"支持 provider id 和 alias 解析",
"每个 provider 声明 transport、auth_kind、env vars、base_url",
"未知 provider 返回明确错误"
],
"unit_tests": [
"provider alias resolution",
"unknown provider error",
"duplicate provider id error"
],
"dependencies": [
"GAE-001"
]
},
{
"id": "GAE-004",
"milestone": "M1",
"title": "实现环境变量与配置文件解析",
"status": "done",
"priority": "P0",
"deliverables": [
"config.py",
"config_loader.py",
".env.example"
],
"acceptance_criteria": [
"按优先级解析 CLI args > env > project config > user config > defaults",
"支持 GENERIC_AGENT_HOME、GA_PROVIDER、GA_MODEL、代理变量",
"项目级配置统一使用 .generic-agent/settings.json",
"全局配置统一使用 $GENERIC_AGENT_HOME/settings.json",
"兼容读取 legacy project-local .generic-agent.yaml",
"支持 .generic-agent/settings.json 风格 JSON settings env block 与 GA_CONFIG_JSON"
],
"unit_tests": [
"env precedence",
"project config path resolution",
"boolean env parsing",
"proxy env resolution"
],
"dependencies": [
"GAE-003"
]
},
{
"id": "GAE-005",
"milestone": "M1",
"title": "实现 API key AuthStore",
"status": "done",
"priority": "P0",
"deliverables": [
"auth/store.py"
],
"acceptance_criteria": [
"auth.json 原子写入",
"支持 put/get/delete provider record",
"权限尽量设置为 0600"
],
"unit_tests": [
"put/get/delete",
"expired token skew",
"atomic write result is valid JSON"
],
"dependencies": [
"GAE-001"
]
},
{
"id": "GAE-006",
"milestone": "M1",
"title": "实现 OpenAI Codex OAuth PKCE 登录",
"status": "done",
"priority": "P0",
"deliverables": [
"auth/openai_oauth.py",
"auth/oauth_server.py",
"commands /login openai-codex"
],
"acceptance_criteria": [
"生成 verifier/challenge/state",
"本地 loopback callback 接收 code",
"token exchange 和 refresh 被接口化",
"测试中使用 mocked HTTP,不触网"
],
"unit_tests": [
"PKCE challenge deterministic validation",
"state mismatch rejection",
"token refresh before expiry",
"logout clears OAuth record"
],
"dependencies": [
"GAE-005"
]
},
{
"id": "GAE-007",
"milestone": "M1",
"title": "实现具体 LLM provider clients",
"status": "done",
"priority": "P0",
"deliverables": [
"providers/openai_responses.py",
"providers/openai_chat.py",
"providers/anthropic_messages.py",
"providers/codex_oauth.py"
],
"acceptance_criteria": [
"统一输出 ChatResponse 和 ToolCall",
"支持 streaming events",
"支持 tool schema 转换",
"provider 错误统一映射为 RuntimeError 子类"
],
"unit_tests": [
"mock OpenAI responses stream parsing",
"mock Anthropic messages stream parsing",
"tool call JSON parse",
"provider error mapping"
],
"dependencies": [
"GAE-003",
"GAE-006"
]
},
{
"id": "GAE-008",
"milestone": "M2",
"title": "重建 Message、ToolCall、ToolResult 数据模型",
"status": "done",
"priority": "P0",
"deliverables": [
"runtime/messages.py",
"runtime/events.py"
],
"acceptance_criteria": [
"内部 message model 不暴露 provider 原始格式",
"支持 tool_result 关联 tool_use_id",
"支持序列化到 session store"
],
"unit_tests": [
"message serialization",
"tool result pairing",
"invalid role rejection"
],
"dependencies": [
"GAE-007"
]
},
{
"id": "GAE-009",
"milestone": "M2",
"title": "实现可测试 AgentLoop",
"status": "done",
"priority": "P0",
"deliverables": [
"runtime/agent_loop.py"
],
"acceptance_criteria": [
"loop 不直接依赖具体 provider",
"turn lifecycle 有明确事件",
"无工具调用时进入 finalization path",
"max_turns、stop signal、retry reason 可测试"
],
"unit_tests": [
"single text response completes",
"single tool call then final response",
"max_turns exceeded",
"stop signal exits"
],
"dependencies": [
"GAE-008"
]
},
{
"id": "GAE-010",
"milestone": "M2",
"title": "实现历史压缩与 token budget",
"status": "done",
"priority": "P1",
"deliverables": [
"runtime/compaction.py",
"runtime/token_budget.py"
],
"acceptance_criteria": [
"压缩旧 thinking/tool 内容",
"保留最近 N 轮完整上下文",
"提供可解释的 compaction summary"
],
"unit_tests": [
"old tool blocks compressed",
"recent messages preserved",
"budget threshold triggers"
],
"dependencies": [
"GAE-009"
]
},
{
"id": "GAE-011",
"milestone": "M3",
"title": "实现 Tool 接口与 ToolRegistry",
"status": "done",
"priority": "P0",
"deliverables": [
"tools/base.py",
"tools/registry.py"
],
"acceptance_criteria": [
"工具 schema、执行器、权限需求分离",
"支持按 name 查找和 enable/disable",
"工具输出统一 ToolResult"
],
"unit_tests": [
"register/resolve tool",
"duplicate tool rejection",
"disabled tool blocked"
],
"dependencies": [
"GAE-009"
]
},
{
"id": "GAE-012",
"milestone": "M3",
"title": "迁移文件工具",
"status": "done",
"priority": "P0",
"deliverables": [
"tools/file_read.py",
"tools/file_write.py",
"tools/file_patch.py",
"tools/path_security.py"
],
"acceptance_criteria": [
"支持 workspace-root 约束",
"patch 必须唯一匹配",
"大文件读取有截断策略"
],
"unit_tests": [
"read range",
"keyword search",
"patch unique match",
"path traversal blocked"
],
"dependencies": [
"GAE-011"
]
},
{
"id": "GAE-013",
"milestone": "M3",
"title": "迁移 shell/code_run 工具",
"status": "done",
"priority": "P0",
"deliverables": [
"tools/shell.py",
"tools/code_run.py",
"tools/permissions.py"
],
"acceptance_criteria": [
"Python 和 shell 执行路径分离",
"支持 timeout、stop signal、stdout streaming",
"危险命令进入 approval/yolo 策略"
],
"unit_tests": [
"successful command",
"timeout kills process",
"dangerous command classified",
"yolo bypass only when enabled"
],
"dependencies": [
"GAE-011"
]
},
{
"id": "GAE-014",
"milestone": "M3",
"title": "工程化浏览器工具",
"status": "done",
"priority": "P1",
"deliverables": [
"tools/browser.py",
"tools/defaults.py",
"browser/cdp_bridge.py",
"browser/html_simplifier.py"
],
"acceptance_criteria": [
"兼容旧 TMWebDriver 行为",
"browser session 状态独立管理",
"web_open 可打开 URL 或搜索 query",
"web_scan 与 execute_js 有输出预算",
"本地 TMWebDriver /link bridge 请求不受 shell 代理环境影响"
],
"unit_tests": [
"session list parsing",
"html simplification removes noise",
"execute_js result normalization",
"cdp bridge bypasses proxy environment"
],
"dependencies": [
"GAE-011"
]
},
{
"id": "GAE-015",
"milestone": "M4",
"title": "实现中心 slash command registry",
"status": "done",
"priority": "P0",
"deliverables": [
"commands.py"
],
"acceptance_criteria": [
"命令定义包含 category、alias、args_hint、subcommands",
"支持 resolve_command",
"支持按 category 展示"
],
"unit_tests": [
"core commands exist",
"alias resolution",
"category grouping"
],
"dependencies": [
"GAE-001"
]
},
{
"id": "GAE-016",
"milestone": "M4",
"title": "实现 CLI bootstrap 与 doctor/status",
"status": "done",
"priority": "P0",
"deliverables": [
"cli/__init__.py",
"cli/__main__.py",
"cli/doctor.py",
"cli/status.py"
],
"acceptance_criteria": [
"--version 是快速路径",
"doctor 检查 provider/auth/state/tool 环境",
"status 输出 session、model、provider、home"
],
"unit_tests": [
"cli --version",
"cli doctor returns zero on scaffold",
"status formatting"
],
"dependencies": [
"GAE-015"
]
},
{
"id": "GAE-017",
"milestone": "M4",
"title": "实现 Rich/prompt-toolkit 交互 CLI",
"status": "done",
"priority": "P1",
"deliverables": [
"ui/console.py",
"ui/banner.py",
"ui/statusbar.py",
"ui/spinner.py",
"ui/completion.py",
"ui/tui.py",
"chat.py"
],
"acceptance_criteria": [
"启动 banner、模型状态栏、tool progress 动效可关闭",
"slash command 补全来自 registry",
"支持 gae --tui、gae tui、空参数 gae chat 进入 TUI",
"TUI 普通输入通过 AgentLoop 调用当前 provider",
"非 TTY 自动降级到 plain text"
],
"unit_tests": [
"non-tty fallback",
"completion source uses command registry",
"statusbar renders current provider/model",
"tui dispatches slash commands",
"cli routes tui entrypoints",
"chat turn service updates runtime messages",
"chat turn service sends default tool schemas"
],
"dependencies": [
"GAE-016"
]
},
{
"id": "GAE-018",
"milestone": "M4",
"title": "补齐 free-code 风格快捷命令",
"status": "done",
"priority": "P1",
"deliverables": [
"commands/session.py",
"commands/config.py",
"commands/tools.py",
"commands/memory.py",
"commands/skills.py"
],
"acceptance_criteria": [
"/new /clear /history /retry /undo /compact /resume 可用",
"/model /providers /login /logout /config /env 可用",
"/login openai-codex 支持 --headless,无浏览器环境只打印授权 URL 并等待或接收 callback/code",
"/tools /skills /memory /doctor /usage 可用",
"命令实现与 registry 解耦"
],
"unit_tests": [
"each command handler has unit coverage",
"headless OAuth login command does not call webbrowser",
"unknown command returns suggestion",
"command availability can be filtered"
],
"dependencies": [
"GAE-017"
]
},
{
"id": "GAE-019",
"milestone": "M5",
"title": "实现 SQLite session store",
"status": "done",
"priority": "P1",
"deliverables": [
"state/session_store.py",
"state/schema.sql"
],
"acceptance_criteria": [
"WAL 模式",
"sessions/messages 表",
"FTS5 搜索消息内容",
"支持 parent_session_id 分支"
],
"unit_tests": [
"create session",
"append message",
"search messages",
"branch session"
],
"dependencies": [
"GAE-008"
]
},
{
"id": "GAE-020",
"milestone": "M5",
"title": "实现 memory service 与 skill crystallization",
"status": "done",
"priority": "P1",
"deliverables": [
"memory/service.py",
"memory/index.py",
"skills/crystallizer.py"
],
"acceptance_criteria": [
"读取旧 GenericAgent memory 作为迁移源",
"区分 L1/L2/L3/L4",
"成功任务可生成 SOP draft",
"人工审核后写入 memory"
],
"unit_tests": [
"memory layer classification",
"legacy GenericAgent memory migration",
"SOP draft generation from structured summary",
"duplicate skill detection",
"reviewed memory write gate"
],
"dependencies": [
"GAE-019"
]
},
{
"id": "GAE-021",
"milestone": "M6",
"title": "行为迁移与兼容测试",
"status": "done",
"priority": "P0",
"deliverables": [
"tests/compat",
"docs/MIGRATION.md"
],
"acceptance_criteria": [
"旧 agentmain.py 的 REPL/task/reflect 关键路径有对应新实现",
"旧 tools_schema.json 的工具均有迁移计划或明确弃用说明",
"README 提供迁移步骤"
],
"unit_tests": [
"compat fixture: no-tool final response",
"compat fixture: file_read tool call",
"compat fixture: code_run tool call"
],
"dependencies": [
"GAE-020"
]
},
{
"id": "GAE-022",
"milestone": "M6",
"title": "发布、报告与交付",
"status": "done",
"priority": "P0",
"deliverables": [
"tasks/TASK_REPORT.md",
"CHANGELOG.md",
"docs/RELEASE_CHECKLIST.md"
],
"acceptance_criteria": [
"全部 P0/P1 测试通过",
"任务报告列出完成项、测试证据、剩余风险",
"git commit 使用 Lore Commit Protocol"
],
"unit_tests": [
"release checklist JSON/Markdown link validation"
],
"dependencies": [
"GAE-021"
]
},
{
"id": "GAE-023",
"milestone": "M7",
"title": "制定高级 TUI 架构与交互规范",
"status": "done",
"priority": "P0",
"deliverables": [
"tasks/TUI_REDESIGN_PLAN.md",
"tasks.json"
],
"acceptance_criteria": [
"明确 Textual 优先、TS/Ink 可选的路线选择",
"定义欢迎页、主聊天区、工具事件区、命令面板、状态栏和输入区",
"定义 GenericAgent/ga 默认进入 TUI 的 CLI 行为",
"定义实时 tool/command/process 事件展示规范"
],
"unit_tests": [
"tasks.json validates as JSON",
"plan artifact exists"
],
"dependencies": [
"GAE-022"
]
},
{
"id": "GAE-024",
"milestone": "M7",
"title": "抽象交互后端与 runtime event protocol",
"status": "superseded_by_GAE-031",
"priority": "P0",
"deliverables": [
"runtime/interactive_backend.py",
"runtime/protocol.py",
"cli/runtime_server.py",
"tests/test_runtime_protocol.py"
],
"acceptance_criteria": [
"TUI 通过统一后端接口发送 prompt、slash command 和 cancel/interrupt",
"后端输出 assistant delta、tool call、tool result、shell output、command output、status update 事件",
"提供 gae runtime serve --stdio 给未来 TS TUI 自动拉起 Python 后端",
"协议为 JSON Lines,消息可 round-trip 序列化"
],
"unit_tests": [
"protocol message serialization",
"backend emits tool lifecycle events",
"stdio server handles request/result/event frames",
"slash command output becomes protocol event"
],
"dependencies": [
"GAE-023",
"GAE-009",
"GAE-011",
"GAE-018"
]
},
{
"id": "GAE-025",
"milestone": "M7",
"title": "实现 Textual 高级 TUI 主界面",
"status": "superseded_by_M9",
"priority": "P0",
"deliverables": [
"ui/textual_app.py",
"ui/theme.py",
"ui/widgets/transcript.py",
"ui/widgets/tool_timeline.py",
"ui/widgets/command_palette.py",
"tests/test_textual_tui.py"
],
"acceptance_criteria": [
"顶部显示 session/provider/model/token/tool 状态",
"欢迎页包含 GenericAgent ASCII logo、紧凑 emblem、快捷命令和当前配置",
"主聊天区实时显示 user/assistant/tool/command/process 事件",
"底部输入框支持 slash command 补全、历史、Tab 补全和 Ctrl-C 中断",
"窄终端自动降级为单列布局"
],
"unit_tests": [
"Textual app mounts core widgets",
"welcome screen renders responsive fallback",
"tool event creates timeline entry",
"command palette filters slash commands",
"input submit sends backend prompt"
],
"dependencies": [
"GAE-024"
]
},
{
"id": "GAE-026",
"milestone": "M7",
"title": "调整 CLI 入口与自动后端启动",
"status": "superseded_by_GAE-037",
"priority": "P0",
"deliverables": [
"pyproject.toml",
"cli/__init__.py",
"tests/test_cli.py"
],
"acceptance_criteria": [
"uv run ga、uv run GenericAgent、uv run gae 默认直接进入高级 TUI",
"显式 gae doctor/status/commands/task/reflect 行为保持兼容",
"TUI 启动时自动创建 Python interactive backend",
"无 Textual 或非交互终端时回退到现有 plain/prompt-toolkit 路径"
],
"unit_tests": [
"ga script points to cli main",
"GenericAgent script points to cli main",
"empty argv enters tui",
"explicit subcommands bypass tui",
"missing Textual fallback"
],
"dependencies": [
"GAE-025"
]
},
{
"id": "GAE-027",
"milestone": "M7",
"title": "实现 free-code 风格实时工具与命令渲染",
"status": "superseded_by_GAE-035",
"priority": "P0",
"deliverables": [
"ui/widgets/tool_timeline.py",
"ui/widgets/process_log.py",
"tools/streaming.py",
"tests/test_tool_event_rendering.py"
],
"acceptance_criteria": [
"工具调用开始、参数、输出、错误、耗时和最终状态可见",
"shell/code_run 输出按 chunk 实时进入 process log",
"web_open/web_scan/web_execute_js 显示浏览器动作和 bridge 错误细节",
"长输出可折叠/展开,默认不刷屏",
"失败事件保留可复制的错误摘要"
],
"unit_tests": [
"shell chunk becomes process event",
"tool result error renders detail",
"long output is collapsible",
"browser bridge error renders actionable message"
],
"dependencies": [
"GAE-024",
"GAE-025"
]
},
{
"id": "GAE-028",
"milestone": "M7",
"title": "补齐 hermes-agent 风格欢迎页与主题系统",
"status": "superseded_by_GAE-034",
"priority": "P1",
"deliverables": [
"ui/banner.py",
"ui/theme.py",
"ui/widgets/welcome.py",
"tests/test_welcome_screen.py"
],
"acceptance_criteria": [
"提供全宽 GenericAgent ASCII logo,终端不足宽时自动切换 compact logo",
"提供左侧 emblem/徽标面板,风格参考 hermes-agent 但品牌为 GenericAgent",
"欢迎页显示 provider/model/auth/session/config 路径和常用命令",
"主题颜色集中配置,plain 模式不输出 Rich/Textual 标记"
],
"unit_tests": [
"wide logo selected above width threshold",
"compact logo selected below width threshold",
"theme palette has required tokens",
"plain banner strips markup"
],
"dependencies": [
"GAE-025"
]
},
{
"id": "GAE-029",
"milestone": "M7",
"title": "TUI 集成测试、文档与任务报告",
"status": "superseded_by_GAE-038",
"priority": "P0",
"deliverables": [
"tests/test_textual_tui.py",
"docs/TUI.md",
"README.md",
"tasks/TASK_REPORT.md",
"CHANGELOG.md"
],
"acceptance_criteria": [
"TUI 关键交互有 mock provider 测试",
"CLI 默认入口和回退路径有测试",
"文档说明 GenericAgent/ga/gae 启动方式",
"任务报告记录变更、测试、剩余风险"
],
"unit_tests": [
"mock chat turn streams into UI",
"slash command renders command result",
"tool call lifecycle renders in order",
"fallback tui path remains usable"
],
"dependencies": [
"GAE-026",
"GAE-027",
"GAE-028"
]
},
{
"id": "GAE-030",
"milestone": "M8",
"title": "评估并原型化可选 TypeScript/Ink TUI",
"status": "superseded_by_M9",
"priority": "P2",
"deliverables": [
"docs/TUI_TS_SPIKE.md",
"apps/tui-ts",
"tests/test_runtime_protocol.py"
],
"acceptance_criteria": [
"TS TUI 只通过 gae runtime serve --stdio 调 Python 后端",
"不复制 provider/tool/session 业务逻辑到 TS",
"原型能发送 prompt、接收 assistant/tool 事件并渲染 transcript",
"给出是否转为正式前端的取舍建议"
],
"unit_tests": [
"stdio protocol compatibility fixture",
"TS frontend smoke test if Node toolchain is present"
],
"dependencies": [
"GAE-024",
"GAE-029"
]
},
{
"id": "GAE-031",
"milestone": "M9",
"title": "Gateway 协议设计与登记",
"status": "done",
"priority": "P0",
"deliverables": [
"tasks/TUI_TS_PROTOCOL.md",
"tasks.json"
],