Compare commits

..

894 Commits

Author SHA1 Message Date
gewuyou
c2d22285ed
Merge pull request #331 from GeWuYou/fix/package-validation-guard
fix(release): 前移发布包清单校验
2026-05-06 21:34:59 +08:00
gewuyou
e3d6aa5111 fix(release): 修复发布校验链路的审查遗留问题
- 修复 PR workflow 中 dotnet pack 重复构建整个 solution 的问题

- 优化 packed modules 校验脚本的 find 实现以兼容 BSD 环境

- 更新 cqrs-rewrite 活跃跟踪与追踪文档中的当前 PR 锚点和审查结论
2026-05-06 21:27:21 +08:00
gewuyou
30ddb841a9 fix(release): 前移发布包清单校验
- 修复 benchmark 项目误入发布面的风险,明确 GFramework.Cqrs.Benchmarks 保持不可打包。

- 新增共享 packed modules 校验脚本,并让 publish 与 CI 工作流复用同一份发布包名单规则。

- 更新 CQRS active tracking 与 trace,记录本轮发布校验前移的恢复点与验证结果。
2026-05-06 21:12:42 +08:00
gewuyou
c65c131d6a
Merge pull request #330 from GeWuYou/fix/microsoft-di-container-disposal
fix(core): 修复容器释放与基准资源泄漏
2026-05-06 20:47:32 +08:00
gewuyou
f0a2978882 fix(core): 修复容器并发释放重复销毁锁
- 修复 MicrosoftDiContainer 在并发 Dispose 场景下可能重复执行底层读写锁销毁的问题

- 补充 IocContainerLifetimeTests 回归用例以覆盖并发释放时的单次锁销毁约束

- 更新 microsoft-di-container-disposal 追踪文档记录剩余 PR review 处理结果
2026-05-06 20:39:38 +08:00
gewuyou
3233151207 fix(ioc): 修复容器释放竞态与清理路径
- 修复 MicrosoftDiContainer 在等待线程与并发 Dispose 场景下泄露底层锁异常的问题
- 更新 IIocContainer 释放契约文档并移除 Clear 中不可达的 provider 释放逻辑
- 新增 benchmark cleanup helper、并发释放回归测试与 ai-plan 恢复入口
2026-05-06 20:23:16 +08:00
gewuyou
0ec8aa076b fix(core): 修复容器释放与基准资源泄漏
- 修复 MicrosoftDiContainer 的 IDisposable 释放逻辑、根 ServiceProvider 清理与释放后访问保护
- 更新 CQRS benchmarks 的容器 cleanup,并补齐 RequestStartupBenchmarks 的冷启动容器释放路径
- 补充 Core 容器生命周期回归测试并归档 issue 327 的 ai-plan topic
2026-05-06 19:08:48 +08:00
gewuyou
588800bb7b
Merge pull request #329 from GeWuYou/chore/archive-completed-ai-plan-topics
chore(ai-plan): 归档已完成专题
2026-05-06 17:22:16 +08:00
gewuyou
ee41206965 chore(ai-plan): 归档已完成专题
- 更新 ai-plan 公共索引,移除 semantic-release-versioning、runtime-generator-boundary 和 github-issue-review-skill 的活跃入口与分支映射
- 归档 三个已完成 topic 的 tracking 与 trace 文档到 ai-plan/public/archive/ 下
2026-05-06 16:59:35 +08:00
gewuyou
db89918333
Merge pull request #328 from GeWuYou/feat/github-issue-review-skill
feat(skills): 新增 GitHub issue 分诊 skill
2026-05-06 16:51:02 +08:00
gewuyou
f25ccccad2 fix(skills): 修复 issue review skill 评审问题
- 修复 issue-review 脚本的代理回退、GitHub Token 认证与 JSON 输出契约

- 调整非 bug issue 的澄清判定并补充 docs、feature 分诊回归测试

- 更新 skill 示例占位符与 ai-plan 跟踪记录,收敛 PR #328 follow-up
2026-05-06 16:25:29 +08:00
gewuyou
ab9829044f feat(skills): 新增 GitHub issue 分诊 skill
- 新增 gframework-issue-review skill,支持抓取 issue 元数据、评论、timeline 与分诊摘要。

- 补充 JSON 输出、唯一 open issue 自动解析与 WSL Linux git 绑定兼容处理。

- 更新 ai-plan 恢复入口并增加脚本级测试与验证记录。
2026-05-06 15:40:48 +08:00
gewuyou
109bce6e9e
Merge pull request #326 from GeWuYou/feat/cqrs-optimization
Test/Add comprehensive CQRS benchmarking suite with reflection and generated invoker paths
2026-05-06 14:29:06 +08:00
gewuyou
6d619b9a1f fix(cqrs): 收敛 benchmark review 收尾问题
- 修复 benchmark workflow 过滤器输入的 shell 注入风险

- 统一 request 与 stream invoker 基准中 MediatR handler 的生命周期基线

- 更新 request pipeline benchmark 的缓存清理与空行为类型声明

- 压缩 cqrs-rewrite active 跟踪与 trace,记录本轮 PR review 收尾结论
2026-05-06 12:57:56 +08:00
gewuyou
2cb6216d05 fix(cqrs): 修复 benchmark 对照宿主与冷启动基线
- 新增 BenchmarkHostFactory 统一 benchmark 最小宿主构建,并限制 MediatR 扫描到当前场景所需类型

- 修复 GFramework benchmark 容器未冻结导致的首次 handler 解析缺口,恢复 RequestStartupBenchmarks 冷启动结果

- 优化 request、pipeline、notification、stream 与 invoker benchmark 的生命周期对齐,减少无关程序集扫描噪音

- 更新 cqrs-rewrite 跟踪与追踪文档,记录 PR #326 benchmark review 收敛、根因和验证结果
2026-05-06 12:09:20 +08:00
gewuyou
f71791ae98 ci(cqrs): 新增手动 benchmark 工作流
- 新增仅支持 workflow_dispatch 的 Benchmark workflow,默认只验证 benchmark 项目 Release build
- 补充可选 benchmark_filter 输入与 BenchmarkDotNet 工件上传,支持按场景手动执行基准测试
- 更新 cqrs-rewrite 跟踪与 trace,记录手动 benchmark workflow 的用途与当前 startup benchmark 残留风险
2026-05-06 11:48:15 +08:00
gewuyou
2ac02c1a6f fix(cqrs): 收敛 benchmark review 修复
- 修复 RequestStartupBenchmarks 的 baseline 分组、初始化阶段对齐与 MediatR 重复注册问题
- 新增共享 dispatcher cache helper,并统一 benchmark 宿主的 MediatR logging/license 过滤配置
- 更新 cqrs-rewrite 跟踪与 trace,记录 PR #326 锚点、验证去重和 startup benchmark 的残留运行风险
2026-05-06 11:07:33 +08:00
gewuyou
449eeb9606 feat(cqrs): 补齐 stream invoker 基准对照
- 新增 stream generated invoker benchmark 与手写 registry,对照 reflection runtime、generated runtime 和 MediatR 的完整枚举开销

- 更新 benchmark README,补充 generated stream invoker provider 的场景说明与后续扩展方向

- 更新 cqrs-rewrite 跟踪与 trace,记录 RP-089 的基线、验证结果和下一批建议
2026-05-06 09:46:52 +08:00
gewuyou
c01abac06e
Merge pull request #325 from GeWuYou/feat/ai-first-config
fix(game-config): 收紧开放对象关键字边界
2026-05-06 09:40:08 +08:00
gewuyou
6e1eaf8f5c test(cqrs): 补充请求调用器生成路径基准
- 新增 request reflection 与 generated invoker provider 的 steady-state 对照基准

- 引入 handwritten generated registry/provider 以走通真实 registrar 与 dispatcher 预热链路

- 更新 benchmark README 与 cqrs-rewrite RP-088 跟踪记录
2026-05-06 09:36:48 +08:00
gewuyou
e0bbf13d88 test(cqrs): 补充请求启动阶段基准
- 新增 request initialization 与 cold-start 基准并对齐当前 runtime 启动口径

- 通过清理 dispatcher 静态缓存隔离 GFramework.Cqrs 首次分发测量结果

- 更新 benchmark README 与 cqrs-rewrite RP-087 跟踪记录
2026-05-06 09:30:17 +08:00
gewuyou
f776d09f68 fix(ai-first-config): 收口开放对象评审跟进
- 修复 Runtime、Generator 与 Tooling 中开放对象关键字校验的不可达 additionalProperties 分支

- 补充 Tooling 对 additionalProperties false 的正向回归测试

- 更新游戏配置接入文档与 ai-plan 跟踪,记录 PR #325 的核验结论和验证结果
2026-05-06 09:25:59 +08:00
gewuyou
a8f98e467d test(cqrs): 补充请求管道数量矩阵基准
- 新增 request pipeline 0/1/4 数量矩阵基准并保持 GFramework.Cqrs 与 MediatR 对照

- 更新 benchmark README 说明当前场景覆盖与后续扩展方向

- 补充 cqrs-rewrite 跟踪与 trace 的 RP-086 恢复点和验证记录
2026-05-06 09:23:07 +08:00
gewuyou
e6f98cb4af test(cqrs): 补充流式请求基准场景
- 新增 StreamingBenchmarks 并对齐 baseline、GFramework.Cqrs 与 MediatR 的完整枚举对照

- 更新 benchmark README 与 CQRS ai-plan 恢复点,记录 stream 场景落地
2026-05-06 09:14:33 +08:00
gewuyou
96729ddcf1 test(cqrs): 补充基准与生成器回归基础设施
- 新增独立的 GFramework.Cqrs.Benchmarks 项目并引入 request、notification 对比场景

- 补充 request 与 stream invoker provider 的 mixed direct/reflected 顺序回归测试

- 更新 solution、meta-package 排除规则与 CQRS ai-plan 恢复点
2026-05-06 08:57:59 +08:00
gewuyou
cb6dd8a510 fix(game-config): 收紧开放对象关键字边界
- 修复 Runtime、Generator 与 Tooling 对 patternProperties、propertyNames、unevaluatedProperties 的静默接受风险

- 补充三端对称回归测试与 reader-facing 文档边界说明

- 更新 ai-plan 恢复点、验证记录与下一步指针
2026-05-06 08:47:42 +08:00
gewuyou
a8c6c11e9e
Merge pull request #324 from GeWuYou/fix/runtime-generator-boundary
fix(game): 剥离运行时模块对生成器依赖
2026-05-05 13:14:24 +08:00
gewuyou
d9ceb83c2c fix(runtime-generator-boundary): 修复边界校验回归问题
- 修复 runtime-generator 边界校验对独立与带参数 attribute 的漏报问题,并过滤注释示例误报

- 新增 Python 回归测试覆盖独立、限定名、多 attribute 与文档示例场景

- 更新贡献文档与 ai-plan 记录,移除面向用户文档中的内部治理段落并补充验证结果
2026-05-05 13:06:18 +08:00
gewuyou
7288114e33 fix(game): 剥离运行时模块对生成器依赖
- 修复 GFramework.Game 对 SourceGenerators.Abstractions 的项目引用并移除未使用的枚举生成 attribute

- 新增 runtime-generator 边界校验脚本并接入 CI 与发布打包校验

- 更新 AGENTS、贡献文档与 ai-plan 跟踪,明确运行时模块禁止依赖生成器能力
2026-05-05 12:39:10 +08:00
gewuyou
c69942d66e
Merge pull request #323 from GeWuYou/feat/cqrs-optimization
Feat/cqrs optimization
2026-05-04 21:03:25 +08:00
gewuyou
212d5b1cce docs(cqrs): 同步 PR 恢复锚点
- 更新 CQRS active tracking 的当前 PR 锚点为 PR #323
- 补充 PR review 收敛 trace 与最新验证结果
2026-05-04 20:56:19 +08:00
gewuyou
b1f406ad99 test(cqrs): 补齐 request handler gate 回归
- 新增缺少 IRequestHandler 合同时的 generator 静默跳过覆盖

- 更新 CQRS 恢复文档与本轮验证记录
2026-05-04 19:17:48 +08:00
gewuyou
61cc1be1e5 test(cqrs): 补齐外部 contract gate 回归
- 新增缺少 ILogger 合同时的 generator 静默跳过覆盖

- 新增缺少 IServiceCollection 合同时的 generator 静默跳过覆盖

- 更新 CQRS 恢复文档与本轮验证记录
2026-05-04 19:15:32 +08:00
gewuyou
915d93d06d test(cqrs): 扩展 registry gate 回归
- 新增缺少 notification handler 合同时的 generator 静默跳过覆盖

- 新增缺少 stream handler 合同时的 generator 静默跳过覆盖

- 新增缺少 registry attribute 合同时的 generator 静默跳过覆盖

- 更新 CQRS 恢复文档与本轮验证记录
2026-05-04 19:12:49 +08:00
gewuyou
e17fa15a01 test(cqrs): 补齐 registry gate 回归
- 新增缺少 ICqrsHandlerRegistry 时的 generator 静默跳过覆盖

- 更新 CQRS 恢复文档与本轮验证记录
2026-05-04 19:01:47 +08:00
gewuyou
857ce08edb test(cqrs): 补齐 fallback 元数据回归
- 新增 mixed fallback 禁用多实例 attribute 时的字符串回退覆盖

- 补充 runtime AttributeUsage 变体测试辅助方法

- 更新 CQRS 恢复文档与本轮验证记录
2026-05-04 18:55:04 +08:00
gewuyou
0ac53a4cee test(cqrs): 补齐 request invoker 合同回归
- 新增 request invoker descriptor 缺失时的 generator 回归覆盖

- 新增 request invoker descriptor entry 缺失时的 generator 回归覆盖

- 更新 CQRS 恢复文档与本轮验证记录
2026-05-04 18:49:26 +08:00
gewuyou
ac95202f9c
Merge pull request #322 from GeWuYou/fix/release-notes-pr-links 2026-05-04 16:05:33 +08:00
gewuyou
478072acc3 fix(release): 修复 git-cliff PR 元数据令牌
- 修复 auto-tag 中 git-cliff 使用 PAT_TOKEN 导致 PR 读取权限不受 job permissions 约束的问题

- 修复 semantic-release trace 中重复日期标题触发 MD024 的问题

- 更新 SEMREL-RP-007 跟踪记录,说明发布说明生成的 token 分工与后续恢复点
2026-05-04 14:19:40 +08:00
gewuyou
53870c1f92 fix(release): 修复发布说明 PR 链接缺失
- 修复 release notes 生成 job 缺少 PR 读取权限的问题

- 更新 semantic-release 主题恢复点与验证记录

- 补充当前修复分支到 ai-plan 启动映射
2026-05-04 10:19:58 +08:00
dependabot[bot]
64c5ecb3ca chore(deps): bump peter-evans/create-pull-request from 7 to 8
Bumps [peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request) from 7 to 8.
- [Release notes](https://github.com/peter-evans/create-pull-request/releases)
- [Commits](https://github.com/peter-evans/create-pull-request/compare/v7...v8)

---
updated-dependencies:
- dependency-name: peter-evans/create-pull-request
  dependency-version: '8'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-05-04 09:59:20 +08:00
dependabot[bot]
2ccacb8102 Bump Meziantou.Analyzer from 3.0.58 to 3.0.60
---
updated-dependencies:
- dependency-name: Meziantou.Analyzer
  dependency-version: 3.0.60
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-05-04 09:59:03 +08:00
dependabot[bot]
ee998503b3 Bump Meziantou.Polyfill from 1.0.120 to 1.0.121
---
updated-dependencies:
- dependency-name: Meziantou.Polyfill
  dependency-version: 1.0.121
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-05-04 09:58:51 +08:00
gewuyou
69ea92c149
Merge pull request #319 from GeWuYou/build/semantic-release-rules
build(release): 支持依赖与安全提交触发补丁发布
2026-05-04 09:58:33 +08:00
gewuyou
c5ca161cb5 build(release): 修复发布说明类型映射
- 修复 release-notes-generator 的 Conventional Commits 类型映射

- 补充 SEMREL-RP-006 的验证结果与 PR review 恢复点
2026-05-04 08:14:41 +08:00
gewuyou
53f8baf2ef build(release): 支持依赖与安全提交触发补丁发布
- 更新 semantic-release 规则,将 deps 与 security 提交映射为 patch 发布

- 补充 AGENTS 与贡献文档中的提交类型语义

- 记录 SEMREL-RP-005 验证结果与分支恢复入口
2026-05-03 23:00:33 +08:00
gewuyou
fe1a875785
Merge pull request #317 from GeWuYou/chore/license-headers
Chore/license headers
2026-05-03 22:59:31 +08:00
gewuyou
4153ea59b8 docs(agents): 补充文件头治理规则
- 补充 AGENTS.md 中的许可证文件头规则

- 修复新增治理文件自身缺失的文件头
2026-05-03 21:00:03 +08:00
gewuyou
ff553977e3 chore(license): 补齐 Apache-2.0 文件头治理
- 新增许可证文件头检查与修复脚本

- 补充维护者手动修复 PR 工作流和 CI 校验

- 更新贡献指南中的文件头说明

- 补齐仓库维护源码和配置文件的许可证声明
2026-05-03 19:39:49 +08:00
gewuyou
a0591afa18
Merge pull request #316 from GeWuYou/docs/godot-logging-composition-archive
docs(godot): 归档 Godot logging 主题
2026-05-03 19:23:43 +08:00
gewuyou
d5d34a626c docs(godot): 修复日志组合文档示例
- 修复组合 logger 示例重复创建文件 appender 的生命周期问题

- 更新 Core logging 文档中的平台无关路径示例

- 补充 Godot 日志页面的路径解析指引承接
2026-05-03 19:07:20 +08:00
gewuyou
230cd0e5d1 docs(godot): 归档 Godot logging 主题
- 补充 GodotLogAppender 与 Core appender 组合示例

- 更新 Godot logging 文档中的文件输出接入说明

- 归档 godot-logging-core-sink 恢复材料并清理 boot 索引
2026-05-03 18:54:33 +08:00
gewuyou
6fa1c20d75
Merge pull request #315 from GeWuYou/feat/godot-logging-core-sink
Feat/godot logging core sink
2026-05-03 15:14:33 +08:00
gewuyou
64e5d8d11d test(godot): 补强日志反射断言
- 补充 GodotLogger 结构化属性反射目标的显式断言

- 优化 反射返回类型不匹配时的测试失败定位

- 更新 godot logging core sink 跟踪与执行 trace
2026-05-03 14:04:59 +08:00
gewuyou
3ced56be8b chore(godot): 处理 Godot 日志 PR 反馈
- 修复 GodotLogAppender 测试对结构化属性顺序的依赖

- 移除 GodotLogger 未使用的私有格式化包装方法

- 更新 ai-plan 默认索引和 trace 恢复记录,避免归档主题与重复标题干扰 boot
2026-05-03 13:24:24 +08:00
gewuyou
1009fee4a4 feat(godot): 新增 Godot 日志 Appender
新增 GodotLogAppender 作为 Core ILogAppender 的 Godot 控制台落点

重构 GodotLogger 输出路径以复用 appender 管线并保持现有 ILogger 入口

补充 Godot appender 渲染测试、文档说明与 active topic 恢复记录
2026-05-03 11:03:58 +08:00
gewuyou
40cce565e6 docs(ai-plan): 启动 Godot logging Core sink 主题
- 归档 Godot logging 合规收尾主题并保留验证结果

- 新增 Godot logging Core sink active topic 恢复入口

- 更新 public boot 索引和当前分支映射
2026-05-03 10:51:16 +08:00
gewuyou
918a61f3b2
Merge pull request #314 from GeWuYou/feat/godot-logging-compliance-polish
Feat/godot logging compliance polish
2026-05-03 10:07:03 +08:00
gewuyou
c967b4df3d fix(godot): 修复日志 review 反馈
- 修复 DeferredLogger 格式化重载提前 string.Format 的热路径问题

- 修复 GodotLogger 默认 options 分配与结构化属性无效 key 处理

- 补充 Godot logging XML 文档、回归测试和 appsettings 接入示例

- 更新 Godot logging PR review 跟踪与验证记录
2026-05-03 09:00:41 +08:00
gewuyou
b4b3538b21 fix(godot): 收敛日志配置评审问题
- 修复 GodotLog 配置源生命周期、Shutdown 释放与延迟 logger 并发发布问题

- 修复 Godot logger 配置归一化、无效数字级别校验和未知级别颜色回退

- 优化 Godot 日志模板缓存边界、内部文档和 update-namespaces 脚本失败传播

- 补充 Godot logging 回归测试、用户文档与 active ai-plan 恢复记录
2026-05-02 22:43:07 +08:00
gewuyou
a52f3c6fec feat(godot): 补齐 GodotLogger 接入文件
- 新增 GodotLogger 的配置加载、延迟入口和宿主输出适配实现。
- 复制 ai-libs/GodotLogger 的 MIT 许可证到 third-party-licenses/GodotLogger/LICENSE。
- 补充 active tracking 与 trace,保留下一阶段对齐点。
2026-05-02 21:39:26 +08:00
gewuyou
748bb714fb feat(godot): 收敛 GodotLogger 宿主能力
- 新增 GodotLog、DeferredLogger 和配置自动发现、热重载接线。
- 修复已缓存 logger 的级别判定与输出路径,使动态配置生效。
- 更新文档与追踪记录,明确当前收敛边界和恢复点。
2026-05-02 21:33:28 +08:00
GeWuYou
36e1ae5f32 feat(godot): add configurable logger templates 2026-05-02 19:33:00 +08:00
gewuyou
6aa741114f ci: include third-party licenses in compliance bundle 2026-05-02 19:10:44 +08:00
gewuyou
5306c98470 chore(ai-plan): archive release summary notes recovery point 2026-05-02 19:10:18 +08:00
gewuyou
35a62e6bfb
Merge pull request #313 from GeWuYou/feat/release-summary-notes
fix(release): 修复发布说明变更汇总标题
2026-05-01 23:36:13 +08:00
gewuyou
43094fba83 fix(release): 修复发布说明变更汇总标题
- 修复 git-cliff 模板的 What's Changed 归属,让分类变更列表承担完整变更清单语义

- 保留 每条变更末尾的作者与 PR 链接,避免新增独立 PR 索引造成重复展示

- 更新 semantic-release-versioning 恢复文档与当前分支映射
2026-05-01 23:29:04 +08:00
gewuyou
a1b3576b09
Merge pull request #308 from GeWuYou/docs/sdk-update-documentation
Docs/sdk update documentation
2026-05-01 21:58:22 +08:00
gewuyou
e391833615
Merge pull request #312 from GeWuYou/feat/release-summary-notes 2026-05-01 21:02:22 +08:00
gewuyou
a870ea28a8 fix(ci): 修复发布说明输出
- 修复 git-cliff 模板重复输出提交的问题

- 更新 GitHub Release 使用 release notes 文件作为正文

- 补充 PR review 修复记录与验证结果
2026-05-01 20:40:01 +08:00
gewuyou
3cb0177936 feat(ci): add cliff-based release summaries 2026-05-01 20:22:08 +08:00
gewuyou
6983b7ee84 docs(source-generators): 收口最新 PR 审查跟进
- 更新 schema-config-generator 文案并同步 PR review 最新建议

- 修复 documentation-full-coverage-governance active tracking 的 RP-055 验证引用与审查事实

- 更新 active trace 的 latest reviewed commit、线程结论与验证摘要
2026-05-01 19:08:39 +08:00
gewuyou
00ecf6fb10 docs(source-generators): 收口 PR 审查文档跟进
- 更新 source-generators 文档中的 fallback 条件说明与自包含运行时示例

- 压缩 documentation-full-coverage-governance active tracking 的验证摘要并同步最新 PR 审查事实

- 补充 active trace 的显式风险记录与本轮验证结论
2026-05-01 17:02:25 +08:00
dependabot[bot]
52b96ed36f Bump Meziantou.Analyzer from 3.0.52 to 3.0.58
---
updated-dependencies:
- dependency-name: Meziantou.Analyzer
  dependency-version: 3.0.58
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-05-01 16:52:02 +08:00
dependabot[bot]
85a8b35154 Bump Meziantou.Polyfill from 1.0.116 to 1.0.120
---
updated-dependencies:
- dependency-name: Meziantou.Polyfill
  dependency-version: 1.0.120
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-05-01 16:51:51 +08:00
dependabot[bot]
9581682231 Bump Microsoft.NET.Test.Sdk from 18.4.0 to 18.5.1
---
updated-dependencies:
- dependency-name: Microsoft.NET.Test.Sdk
  dependency-version: 18.5.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: Microsoft.NET.Test.Sdk
  dependency-version: 18.5.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: Microsoft.NET.Test.Sdk
  dependency-version: 18.5.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: Microsoft.NET.Test.Sdk
  dependency-version: 18.5.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: Microsoft.NET.Test.Sdk
  dependency-version: 18.5.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: Microsoft.NET.Test.Sdk
  dependency-version: 18.5.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: Microsoft.NET.Test.Sdk
  dependency-version: 18.5.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-05-01 16:51:35 +08:00
gewuyou
896e3efaa9 docs(source-generators): 收口 PR 审查中的文档入口表述
- 更新 source-generators 文档中的测试入口表述,使用语义化链接标签替代源码路径

- 校正 documentation-full-coverage-governance active ai-plan 的 PR 审查事实、验证结果与下一步恢复点
2026-05-01 15:37:26 +08:00
gewuyou
4fdb1e7398 docs(ai-plan): 收口 PR 审查遗留文档问题
- 修复 documentation-full-coverage-governance 归档中的 Markdown 行内代码闭合错误

- 更新 active tracking 与 trace,使其反映 PR #308 review 的本地核验结论

- 补充本轮文档构建验证结果与后续恢复步骤
2026-05-01 13:29:52 +08:00
gewuyou
241c9ffeb3 docs(source-generators): 补充迁移兼容说明并归档恢复历史
- 补充 Schema 配置生成器专题的迁移步骤、兼容边界与回退建议

- 更新 active tracking 与 active trace,只保留当前恢复事实、验证结果与归档指针

- 新增 RP-049 到 RP-052 的状态、验证与时间线归档文件
2026-05-01 13:22:14 +08:00
gewuyou
7e77fee0a5 docs(ai-plan): 更新文档覆盖恢复点
- 更新 committed diff 基线,记录本轮提交后的 8 files / 337 lines 状态

- 补充 documentation-full-coverage-governance 的下一步建议,避免后续按过时工作树峰值恢复
2026-05-01 13:22:13 +08:00
gewuyou
103b961e6f docs(source-generators): 补充生成器专题覆盖并更新进度
- 新增 Schema 配置生成器专题页,补充输入契约、生成物与诊断边界

- 更新 source-generators、API 参考与 CQRS 文档,说明共享支撑层阅读路线与 fallback 分层

- 更新 documentation-full-coverage-governance 的 tracking 和 trace,记录批次指标与验证结果
2026-05-01 13:22:12 +08:00
gewuyou
1c21df1414
Merge pull request #307 from GeWuYou/feat/cqrs-optimization
Feat/Add stream invoker provider support to CQRS handler registry generator
2026-05-01 09:31:00 +08:00
gewuyou
26314dba5e docs(cqrs-rewrite): 收敛恢复入口文档
- 更新 active tracking,仅保留 RP-076、PR #307、活跃风险、权威验证与下一推荐步骤

- 重构 active trace,仅保留当前阶段决策、验证结果与后续恢复方向

- 补充 RP-062 至 RP-076 的 trace 归档,承接迁出的历史阶段上下文
2026-04-30 18:47:55 +08:00
gewuyou
9296def108 test(cqrs): 补齐 stream invoker gate 回归
- 补充 stream invoker descriptor 与 descriptor entry 缺失时整体跳过 provider 元数据的生成器回归

- 优化测试辅助重命名逻辑,精确模拟 metadata name 缺失而不破坏其余合同编译

- 更新 cqrs-rewrite 跟踪与追踪,记录 PR #307 follow-up 的恢复点和验证结果
2026-04-30 17:50:30 +08:00
gewuyou
83528742bb fix(cqrs): 收敛生成调用描述符与PR评审回归
- 修复 request 与 stream generated invoker 描述符的静态方法与空值防御,提前拒绝非法元数据

- 补充 provider 空描述符枚举与非静态 invoker 回退回归,更新相关 XML 注释与中文文档语义

- 更新 cqrs-rewrite 活跃跟踪、执行 trace 与验证归档,记录 PR #307 的当前验证结论
2026-04-30 16:25:59 +08:00
gewuyou
36db7d0929
Merge pull request #306 from GeWuYou/feat/ai-first-config
Feat/ai first config
2026-04-30 16:09:43 +08:00
gewuyou
e671646a74 fix(ai-first-config): 收口 PR 306 审查遗留项
- 新增 Generator 与 Tooling 的 anyOf 和坏形状回归覆盖,补齐组合关键字与未知 type 拒绝

- 修复 VS Code 配置工具的 object-array 直属项收集与 contains 文案一致性问题

- 更新 README、Game 文档与工具说明,明确 additionalProperties 显式 false 边界与最小接入路径

- 补充 ai-plan 跟踪与 trace,记录 PR 306 open threads 收口结果和验证摘要
2026-04-30 15:22:04 +08:00
gewuyou
8b36626266 test(cqrs): 补充 provider fallback 回归
- 新增 non-enumerating request 与 stream provider 回归,锁定 dispatcher 会继续回退到反射路径

- 更新 CQRS 重写恢复点到 RP-074,并记录定向验证结果
2026-04-30 15:04:10 +08:00
gewuyou
040bcb99e4 fix(ai-first-config): 收口当前 PR 审查遗留项
- 新增 anyOf 对称运行时回归测试,覆盖组合关键字拒绝分支

- 更新 Game Abstractions README 的配置系统链接显示名,避免暴露原始路径

- 精简 active tracking 的批次级验证细节并补充恢复指针

- 清理 trace 中重复日期标题,消除 MD024 风险
2026-04-30 15:03:47 +08:00
gewuyou
1091594224 fix(cqrs): 收敛 generated invoker 异常语义
- 修复 request 与 stream generated invoker 签名不兼容时冒出 ArgumentException 的行为,统一包装为 InvalidOperationException

- 补充对应 runtime 回归测试并更新 CQRS 重写恢复点到 RP-073
2026-04-30 14:59:19 +08:00
gewuyou
502f65239c test(cqrs): 补充 provider gate 合同回归
- 新增 request 与 stream gate 回归,锁定 runtime 合同不完整时不会发射 invoker provider 元数据

- 更新 CQRS 重写恢复点到 RP-072,并记录定向验证与 helper 收敛
2026-04-30 14:53:05 +08:00
gewuyou
dc21188c79 test(cqrs): 锁定 precise reflected provider 边界
- 新增 request 与 stream generator 回归,明确 precise reflected 注册不会发射 invoker provider 元数据

- 更新 CQRS 重写恢复点到 RP-071,并记录本轮验证与边界结论
2026-04-30 14:44:51 +08:00
gewuyou
6b5c5d9e2d docs(cqrs): 更新生成式 invoker 恢复点
- 更新 CQRS 重写跟踪到 RP-070,补充 hidden-implementation generated invoker runtime 回归说明

- 补充本轮定向验证结果与当前相对 origin/main 的 branch diff 指标
2026-04-30 14:37:12 +08:00
gewuyou
5a77e2fb33 test(cqrs-tests): 补充 hidden implementation generated invoker 回归
- 新增 hidden implementation request provider runtime 集成回归,验证 registrar 与 dispatcher 会继续消费 generated metadata

- 新增 hidden implementation stream provider runtime 集成回归,覆盖可见 handler interface 下的流式 dispatch 路径

- 补充对应测试替身 registry 与隐藏 handler 容器,保持现有 generated invoker 测试风格
2026-04-30 14:13:09 +08:00
gewuyou
eb30388267 feat(cqrs): 扩大生成式 invoker 发射范围
- 扩大 request 与 stream invoker 发射范围到 reflected-implementation 注册场景

- 补充 hidden implementation 回归测试并更新 CQRS ai-plan 恢复点
2026-04-30 14:07:05 +08:00
gewuyou
172c08176c test(cqrs): 补充 hidden implementation provider 元数据断言
- 新增 hidden implementation 但 visible handler interface 的 request provider 生成断言

- 新增 hidden implementation 但 visible handler interface 的 stream provider 生成断言
2026-04-30 13:34:08 +08:00
gewuyou
ea0b937705 feat(cqrs): 补充生成式 stream invoker 接缝
- 新增 stream invoker provider、descriptor 与 dispatcher/registrar 接线

- 更新 source generator 与回归测试,覆盖 generated stream invoker 发射和消费语义

- 更新 CQRS 文档与 ai-plan 恢复点,补充 stream invoker 的接入与验证记录
2026-04-30 13:26:54 +08:00
gewuyou
85f7c1707e docs(game): 同步场景与宿主入口配置边界
- 补充 Scene 与 UI 入口对配置系统正式边界页的指引

- 明确 oneOf、anyOf 与非 false additionalProperties 不属于默认采用路径

- 更新 Godot storage 入口对 VS Code 工具辅助层与 raw YAML 回退路径的说明
2026-04-30 13:25:29 +08:00
gewuyou
01f1e5fd72 docs(game): 同步数据与设置入口配置边界
- 补充 data 与 setting 入口对 AI-First 配置系统共享 schema 子集的 reader-facing 提示

- 说明 DataRepository、UnifiedSettingsDataRepository 与 SettingsModel 负责持久化和应用而不放宽配置契约

- 更新复杂 schema shape 回到 config-system 与 raw YAML 处理的采用指引
2026-04-30 13:25:29 +08:00
gewuyou
e8203bc76e docs(game): 同步生成器与持久化入口配置边界
- 补充 Game.SourceGenerators 对共享 schema 子集的 reader-facing 采用边界说明

- 更新 serialization 与 storage 页面中的复杂 schema 回退路径提示

- 明确 oneOf、anyOf 与非 false additionalProperties 不属于默认采用路径
2026-04-30 13:25:29 +08:00
gewuyou
7e62313b24 docs(game): 同步总览入口配置采用边界
- 补充首页、入门页与 API 导航对 AI-First 配置工作流正式契约的高层说明

- 更新入口提示以说明 additionalProperties: false 与 oneOf/anyOf 的默认采用边界

- 强调超出共享 schema 子集的复杂 shape 应回到 raw YAML 与 schema 设计处理
2026-04-30 13:25:26 +08:00
gewuyou
74f853bffe docs(game): 同步生成器与抽象层配置边界
- 更新 source-generators 入口,说明 Game.SourceGenerators 面向与 Runtime 对齐的共享 schema 子集

- 补充 abstractions 文档与 README,明确配置契约实现边界仍需回到 GFramework.Game 与 config-system 文档

- 强调 oneOf、anyOf 与非 false 的 additionalProperties 不属于当前 reader-facing 采用路径
2026-04-30 13:23:19 +08:00
gewuyou
56a96b50fd docs(game): 同步配置入口采用边界
- 更新 Game 入口页的静态 YAML 配置接入提示,明确 Runtime 与 Source Generator 的共享契约优先级

- 补充安装入口对 additionalProperties: false 与 oneOf / anyOf 拒绝边界的 reader-facing 提示

- 优化入口页采用建议,说明复杂 shape 应回退到 raw YAML 与 schema 设计本体
2026-04-30 13:23:19 +08:00
gewuyou
0721cafd03 docs(game): 同步配置工作流入口边界
- 更新仓库根 README 的 AI-First 配置接入提示与共享子集边界说明

- 补充 GFramework.Game README 中的配置系统采用约束与 raw YAML 回退路径
2026-04-30 13:23:19 +08:00
gewuyou
fdcb11c92c fix(config-tool): 收紧坏形状 schema 解析边界
- 修复 Tooling 侧 additionalProperties 仅接受 false 的共享边界校验

- 补充数组 items 与 contains 子 schema 必须显式声明 type 的拒绝逻辑

- 更新 ai-plan 恢复摘要与 JS 回归测试验证记录
2026-04-30 13:23:19 +08:00
gewuyou
e8cceac7ae docs(game): 补齐配置工具能力边界说明
- 更新 config system 与 config tool 的 reader-facing 边界说明

- 补充 additionalProperties:false、oneOf/anyOf rejection 与 raw YAML 回退路径

- 记录本批次 Tooling/Docs 收口验证与下一步
2026-04-30 13:23:19 +08:00
gewuyou
7f98cafbfa fix(config-tool): 统一 contains 与本地化提示文案
- 修复 dependentRequired 校验消息键缺失导致的隐式 undefined 文案映射

- 统一 contains 与 dependent schema 相关中文提示措辞并补齐 maxContains hint 输出

- 补充本地化与 contains 摘要测试覆盖新增文案与回归场景
2026-04-30 13:23:19 +08:00
gewuyou
3f335f19d6 docs(game): 收口配置工具说明入口
- 更新 config-tool 文档,承接 VS Code 工具能力、边界与适用场景说明

- 优化 config-system 文档,移除重复工具细节并保留系统级入口说明
2026-04-30 13:23:19 +08:00
gewuyou
13b77eb3fe fix(game-config): 显式声明闭合对象字段边界
- 修复 Runtime 与 Source Generator 对 additionalProperties 的隐式闭合对象语义,统一接受 additionalProperties:false 并拒绝其它开放对象形状

- 补充 Release 回归测试,覆盖生成器诊断与运行时 additionalProperties 边界

- 更新配置工具元数据与 README 说明,使命令、设置和当前能力描述保持一致
2026-04-30 13:23:19 +08:00
gewuyou
eddce21383 docs(ai-first-config-system): 补充 tooling lane 收口验证记录
- 更新 tracking 中的 Tooling lane 收口验证结果,补齐实际的 Release build 结论
2026-04-30 13:23:19 +08:00
gewuyou
fad391e8cf feat(config-tool): 支持对象数组内嵌对象数组编辑
- 新增对象数组编辑器对数组项内嵌对象数组的递归渲染与保存能力

- 补充嵌套对象数组表单模型与 YAML 写回回归测试

- 更新配置系统文档中的 raw YAML 回退边界说明
2026-04-30 13:23:19 +08:00
gewuyou
d6a154726c fix(game-config): 显式拒绝 oneOf 与 anyOf 组合关键字
- 修复 Runtime、Source Generator 与 Tooling 对 oneOf/anyOf 的静默接受,统一改为显式报错

- 补充 JS 与 Release 测试回归,覆盖生成器诊断和运行时拒绝路径

- 更新 ai-plan 跟踪与中文文档,明确后续默认跳过会改变生成类型形状的组合关键字
2026-04-30 13:23:19 +08:00
gewuyou
f17f9f3da6 test(cqrs): 补充 stream invoker provider 生成断言
- 新增 stream invoker provider runtime fixture,复用 request provider 测试风格锁定 descriptor 和静态 invoker 形状

- 补充 Phase 8 stream invoker provider 回归测试骨架,并暂时以 Ignore 挂起等待主线程生成实现落地
2026-04-30 13:14:29 +08:00
gewuyou
98477068d6 docs(cqrs): 补充生成式 stream invoker 文档语义
- 更新 CQRS runtime 与生成器文档,补充 generated stream invoker provider / descriptor 的并列表述。

- 说明 runtime 优先消费 generated request / stream invoker 元数据,未命中时回退到既有反射 binding。

- 调整 request-only 措辞,使 reader-facing 文案与现有 generated request invoker 语义保持一致。
2026-04-30 13:14:11 +08:00
gewuyou
8d6fc74b3d
Merge pull request #305 from GeWuYou/feat/cqrs-optimization
Feat/Add notification publisher seam and request invoker provider for CQRS runtime
2026-04-30 13:05:41 +08:00
gewuyou
0f1e91a499 fix(cqrs): 收口PR审查遗留问题
- 修复并发 CQRS 解析测试的失败路径释放逻辑,并收敛重复 orchestration 以消除新增 analyzer warning

- 更新 generated request invoker provider 相关测试、XML 文档与 generator 注释,明确默认 runtime 的描述符预热契约

- 调整 legacy runtime alias 注册与 generated provider 注册顺序,并同步 cqrs-rewrite 跟踪文档中的 PR #305 triage 结果
2026-04-30 12:58:05 +08:00
gewuyou
0c65cd8e38 feat(cqrs): 前移请求调用器生成注册
- 新增 generated request invoker provider seam,并让 registrar 与 dispatcher 复用编译期请求调用元数据

- 扩展 CQRS source generator 发射 request invoker provider 成员与最小 request invoker 方法

- 补充 runtime 与 source-generator 回归测试,并更新 cqrs-rewrite 追踪到 RP-067
2026-04-30 12:10:25 +08:00
gewuyou
7209fdc32d docs(cqrs): 收口旧版运行时别名说明
- 更新 LegacyICqrsRuntime 兼容层说明,明确旧命名空间别名与正式 CQRS runtime seam 的边界

- 补充容器基础设施回填 legacy alias 的回归测试,并收敛相关 helper 注释

- 更新 cqrs-rewrite 跟踪与 trace,记录 RP-066 的批处理结果和验证
2026-04-30 11:38:52 +08:00
gewuyou
c1dfee3c71 test(core): 补充架构上下文CQRS懒解析回归
- 新增 PublishAsync 与 CreateStream 并发首次访问只解析一次 ICqrsRuntime 的回归测试

- 更新 cqrs-rewrite 跟踪与 trace,记录三份 Mediator 测试命名收口已完成
2026-04-30 11:28:37 +08:00
gewuyou
b015a91e57 test(cqrs): 收口 ArchitectureContext 综合测试命名
- 重命名综合测试类、命名空间与文件路径,使其与 CQRS 和 ArchitectureContext 语义一致

- 更新中文注释与局部变量命名,移除残留的 Mediator 表述且不改变测试行为

- 收窄文件内测试辅助类型可见性,避免额外暴露旧语义类型并保持项目编译通过
2026-04-30 11:26:18 +08:00
gewuyou
f44629deb3 test(cqrs): 统一架构上下文集成测试命名
- 重命名 CQRS 架构上下文集成测试文件、命名空间与测试类以移除 Mediator 语义残留

- 更新嵌套测试类型、局部变量与中文注释为 CQRS 和 ArchitectureContext 一致命名

- 补充公开测试类型与成员的 XML 文档说明而不改变测试断言行为
2026-04-30 11:25:16 +08:00
gewuyou
e1af8ac833 test(cqrs): 收口高级特性测试的CQRS命名
- 重命名高级特性测试类、命名空间与文件路径,统一到 CQRS 与 ArchitectureContext 语义

- 更新测试方法名、中文注释与日志器名称,移除残留的 Mediator 命名

- 补充当前测试文件内辅助类型的 XML 文档,保持测试行为不变
2026-04-30 11:24:22 +08:00
gewuyou
22f608eb4d feat(cqrs): 新增通知发布策略接缝
- 新增 notification publisher seam 与默认顺序发布器,保持零处理器静默完成与首错即停语义

- 调整 dispatcher、runtime factory 与测试基础设施,支持复用容器中预注册的通知发布策略

- 补充 publisher 回归测试并更新 CQRS 文档与 ai-plan 恢复点
2026-04-30 11:07:24 +08:00
gewuyou
a3fe2974f7 docs(cqrs): 归档CQRS与Mediator评估结论
- 新增 CQRS 与 Mediator 的结构化评估归档,明确生产替代完成度与设计吸收差距

- 更新 cqrs-rewrite active tracking 与 trace,提升恢复点到 RP-063 并重排后续优先级

- 补充本轮最小 Release 构建验证结果,保持 ai-plan 恢复入口与实际状态一致
2026-04-30 10:16:35 +08:00
gewuyou
5eea12b5ba
Merge pull request #304 from GeWuYou/feat/cqrs-optimization
Feat/cqrs optimization
2026-04-30 09:43:53 +08:00
gewuyou
72ce0f1199 test(cqrs): 收敛剩余 PR304 review 跟进
- 修复 fallback failure 测试夹具的并行执行与 stream state 文档命名问题

- 归档 cqrs-rewrite 历史 trace 与验证记录并压缩 active 恢复入口

- 更新当前验证结果与下一步,保持 PR304 review follow-up 可恢复
2026-04-30 09:23:01 +08:00
gewuyou
98021f59e7 test(cqrs): 补齐 PR304 测试 XML 注释
- 补齐上下文校验 handler 的 Handle 参数与返回 XML 注释

- 更新带 DispatchId 的测试请求与通知 XML 参数注释

- 记录 cqrs-rewrite 主题的本轮 PR review 跟进
2026-04-30 09:00:24 +08:00
gewuyou
255a6a152e fix(cqrs): 收敛 PR 304 review 跟进
- 修复 CqrsDispatcher 的 pipeline invoker 重复创建,并补齐缓存线程模型文档

- 优化 CQRS 与 generator 回归测试的并发保护和稳定语义断言

- 更新 cqrs-rewrite 跟踪与 trace,记录 RP-062 的 PR review follow-up 验证结果
2026-04-30 07:43:42 +08:00
gewuyou
bc365197e8 docs(cqrs): 刷新批处理恢复点记录
- 更新 cqrs-rewrite 跟踪与 trace,记录 RP-061 的 registrar fallback 失败分支批次

- 同步当前 gframework-batch-boot 50 的分支规模与下一步恢复入口
2026-04-29 23:03:22 +08:00
gewuyou
a445807b83 test(cqrs): 新增 registrar fallback 失败分支测试
- 新增独立测试文件覆盖 fallback 名称无法解析时的 warning 与跳过行为

- 新增 fallback 名称解析抛异常时的 warning 回归断言

- 补充 direct fallback 跨程序集条目被跳过并记录 warning 的验证
2026-04-29 23:03:22 +08:00
gewuyou
52b9ddd4a7 test(cqrs): 补充上下文前置条件失败回归
- 新增 dispatcher 上下文校验测试,锁定非 IArchitectureContext 上下文的 request、notification 与 stream 失败语义

- 通过公开 runtime 工厂与最小容器 mock 覆盖调用前校验路径,不改 runtime 实现

- 更新 cqrs-rewrite 跟踪与 trace,记录 RP-060 的验证结论
2026-04-29 23:03:21 +08:00
gewuyou
57d848546f test(cqrs): 补充非请求分发上下文回归
- 新增 notification 与 stream dispatch binding 上下文刷新回归,锁定缓存复用时仍按当次分发重新注入上下文

- 补充测试替身记录 handler 实例身份与 ArchitectureContext,覆盖重复分发场景

- 更新 cqrs-rewrite 跟踪与 trace,记录 RP-058 和 RP-059 的验证结论
2026-04-29 23:03:21 +08:00
gewuyou
226c0b3b49 test(cqrs): 补充注册服务程序集去重测试
- 新增 DefaultCqrsRegistrationService 的独立测试文件,覆盖同次调用内的重复程序集键去重行为

- 验证跨两次调用重复程序集键时会跳过注册并写入 debug 日志
2026-04-29 23:03:21 +08:00
gewuyou
36596210ff test(cqrs): 新增 ReflectionFallbackAttribute 合同测试
- 新增 CqrsReflectionFallbackAttribute 的叶子级合同测试,覆盖旧版 marker 语义

- 补充字符串与 Type 输入的过滤、去重、排序归一化断言

- 验证空参数数组保护,固定 runtime 可依赖的 attribute 元数据边界
2026-04-29 23:03:21 +08:00
gewuyou
16cd96b94b test(cqrs): 补充 dispatcher 缓存上下文回归
- 新增 cached request pipeline executor 的上下文刷新回归测试与专用测试替身

- 记录 singleton behavior 生命周期语义下的上下文重新注入结论

- 更新 cqrs-rewrite 跟踪与 trace 恢复点到 RP-057
2026-04-29 23:03:21 +08:00
gewuyou
5365f9aec2 refactor(cqrs): 删除 pointer 运行时重建残留
- 重构 CqrsHandlerRegistryGenerator 的运行时类型引用模型,移除不可达的 pointer 子结构

- 删除 SourceEmission 中已失效的 MakePointerType 发射分支,保持 pointer 拒绝语义不变

- 更新 cqrs-rewrite 跟踪与 trace,记录本轮清理和定向验证结果
2026-04-29 23:03:21 +08:00
gewuyou
e51b64f8d5 test(cqrs): 补齐外部隐藏泛型精确注册回归
- 新增外部程序集隐藏泛型定义与可见类型实参的 precise registration 回归

- 更新 CQRS 重写跟踪与 trace,记录本轮覆盖范围和验证结果
2026-04-29 23:03:21 +08:00
gewuyou
7b5efde3bd test(cqrs): 补强数组类型生成回归
- 新增多维数组、交错数组与外部程序集隐藏元素类型的 precise runtime type lookup 回归

- 更新 cqrs-rewrite 跟踪与追踪,记录 RP-053 到 RP-054 的并行批次收口与验证结果
2026-04-29 23:03:21 +08:00
gewuyou
e81a43680d fix(cqrs): 缓存请求管道执行形状
- 优化 CqrsDispatcher 的 request pipeline 路径,按请求类型与行为数量缓存 typed executor 形状并在单次分发中绑定当前 handler 与 behaviors

- 补充 dispatcher 缓存回归测试,覆盖 pipeline executor 的首次创建、后续复用与行为顺序稳定
2026-04-29 23:03:21 +08:00
gewuyou
3b4eb3e40a docs(cqrs): 更新入口与回退语义说明
- 更新 CQRS 入口文档,明确 generated registry 优先与 targeted fallback 的注册顺序

- 修正 README 对 CqrsReflectionFallbackAttribute 的过时描述,补充多实例与 Type 或字符串双合同语义

- 优化 API 参考中的 CQRS 阅读关注点,突出 generated registry 与 targeted fallback contract
2026-04-29 23:03:21 +08:00
gewuyou
79f9cb3706
Merge pull request #303 from GeWuYou/docs/sdk-update-documentation
Docs/sdk update documentation
2026-04-29 22:59:12 +08:00
gewuyou
ddaabd8104
Merge pull request #302 from GeWuYou/feat/cqrs-optimization
Feat/cqrs optimization
2026-04-29 16:32:45 +08:00
gewuyou
8d8b94f608 fix(cqrs): 收敛 fallback 审查跟进
- 修复 generator preamble 的多实例 fallback 特性排版并移除死参数

- 补强 mixed/direct fallback 生成回归断言并拒绝空 marker

- 更新 CQRS 审查跟踪记录与 XML 文档
2026-04-29 16:20:15 +08:00
gewuyou
76fcdb8233 perf(cqrs): 拆分混合 fallback 元数据
- 优化 CqrsReflectionFallbackAttribute 与生成器发射策略,在 mixed 场景下拆分 Type 与字符串 fallback 元数据
- 补充 CQRS runtime 与 SourceGenerators 回归测试,锁定多实例 fallback 特性和定向类型回查行为
- 更新 CQRS 生成器文档与 ai-plan 恢复记录,沉淀 RP-052 的验证结果与下一步
2026-04-29 13:37:05 +08:00
gewuyou
1d5404e206 docs(documentation-governance): 收口数据与 UI 文档措辞
- 更新 Game 数据与存储页面、Godot UI 页面中的 reader-facing 说明,移除内部证据口吻、外部项目指代和生硬导流

- 更新 CQRS 抽象层与 SourceGenerators.Common README 的标签表述,避免暴露源文件路径列表和实现级打包术语

- 补充 documentation-full-coverage-governance 的 RP-050 恢复点、验证结果与 origin/main stop-condition 计量
2026-04-29 13:36:07 +08:00
gewuyou
5fd71f3620 perf(cqrs): 收敛生成器 fallback 元数据发射
- 优化 CqrsHandlerRegistryGenerator 的 fallback 合同探测与元数据发射策略,在可直接引用 handlers 时优先输出 Type 元数据
- 补充 SourceGenerators 回归测试,覆盖字符串合同兼容路径与直接 Type 元数据优先级
- 更新 CQRS 生成器说明与 ai-plan 恢复文档,记录 RP-051 的验证结果与后续方向
2026-04-29 13:25:20 +08:00
gewuyou
e18512f043 docs(documentation-governance): 收口 Game 与 Godot 文档措辞
- 更新 Game / Godot 细页的交叉链接与边界描述,移除内部路径、旧文档对比和命令式跳转

- 更新 GFramework.Godot 与配置工具 README 的公开标签,避免暴露测试路径和原始文档路径

- 补充 documentation-full-coverage-governance 的 RP-049 恢复点、验证结果与 origin/main stop-condition 计量
2026-04-29 13:23:26 +08:00
gewuyou
4557dde631
Merge pull request #301 from GeWuYou/fix/analyzer-warning-reduction-batch
Fix/analyzer warning reduction batch
2026-04-29 11:14:56 +08:00
gewuyou
0ad2ed1761 fix(game): 修复空对象配置比较键并归档 warning reduction 主题
- 修复 YamlConfigAllowedValue 与 YamlConfigConstantValue 对空对象 const 或 enum 比较键的误判,同时继续拒绝非空纯空白输入
- 补充 YamlConfigModelContractTests 对空比较键与纯空白比较键的回归覆盖,并验证空对象 const 场景
- 更新 ai-plan 公共索引并归档 analyzer-warning-reduction 主题,保留最终 PR review 结论与验证记录
2026-04-29 10:27:01 +08:00
GeWuYou
590f2cb516 fix(enum):补充枚举注解 2026-04-29 10:17:02 +08:00
gewuyou
f5f2c251e5 fix(pr-review): 修复当前评审中仍然成立的问题
- 修复 Mediator 集成测试中的阻塞等待、缓存竞态与共享状态原子性问题

- 补充 YamlConfig 运行时模型的构造期约束与 exception XML 文档

- 新增 模型契约回归测试并更新 analyzer warning reduction 恢复文档
2026-04-29 09:19:24 +08:00
gewuyou
7da985947c fix(game): 清理剩余配置 schema warning
- 重构 YamlConfigSchemaValidator 的长方法为语义化 helper,清理剩余 MA0051 warning
- 修复 条件分支 helper 的字符串比较方式,避免新增 MA0006 warning
- 更新 analyzer warning reduction 跟踪与 trace,记录仓库根 clean build 已归零
2026-04-29 08:55:03 +08:00
gewuyou
104ac25dc3 refactor(game): 拆分 schema 校验模型类型
- 拆分 schema model 类型到独立同名文件

- 清理 schema 校验模型的文件命名 analyzer 告警

- 更新 warning reduction 批处理收口状态
2026-04-29 08:38:23 +08:00
gewuyou
1395b84439 refactor(game): 拆分对象 schema 关键字校验方法
- 重构 dependentRequired 与 dependentSchemas 的单项解析流程

- 重构 allOf 与条件 schema 的分支解析流程

- 优化 object-focused 内联 schema 的 properties 与 required 校验拆分
2026-04-29 08:32:04 +08:00
gewuyou
e1c1eb1123 fix(game): 收紧 schema 正则校验边界
- 修复 schema 正则校验缺少超时边界导致的 analyzer 风险

- 更新字符串等值比较为 ordinal 语义

- 补充 warning reduction 批处理恢复状态与验证结果
2026-04-29 08:26:19 +08:00
gewuyou
9109eecea9 test(cqrs): 减少 Mediator 综合测试告警
- 优化测试 helper 类型作用域以消除文件名匹配告警

- 补充异步等待 ConfigureAwait(false) 以满足 analyzer 约束

- 调整集合抽象、字符串比较器和异常参数名用法
2026-04-29 08:19:16 +08:00
gewuyou
121df440c3 test(cqrs): 清理 Mediator 高级测试告警
- 修复 Mediator 高级测试中的异步等待告警

- 修复 验证请求异常参数名告警

- 优化 测试辅助类型区域的文件名告警处理
2026-04-29 08:18:16 +08:00
gewuyou
ed269d4a34 test(cqrs): 清理 Mediator 架构集成测试警告
- 优化 Mediator 架构集成测试的 helper 类型作用域,消除文件名与类型名警告

- 补充异步测试路径的 ConfigureAwait(false),满足 analyzer 要求

- 更新测试集合暴露类型为只读或抽象集合,保留行为不变
2026-04-29 08:16:05 +08:00
gewuyou
0e32dab4a2
Merge pull request #299 from GeWuYou/docs/sdk-update-documentation
Documentation: migrate from ai-libs examples to generic guidance
2026-04-28 17:15:47 +08:00
gewuyou
18115f8807
Merge pull request #300 from GeWuYou/fix/analyzer-warning-reduction-batch
Fix/analyzer warning reduction batch
2026-04-28 16:04:24 +08:00
gewuyou
5c4f2df15b docs(analyzer-warning-reduction): 同步PR审查恢复记录
- 更新 tracking 文档中的变更文件计数与验证口径,使其与当前 PR head 和 trace 记录一致。

- 补充 RP-092 trace,记录当前 open threads 复核结论、定向测试结果与后续恢复步骤。
2026-04-28 15:49:26 +08:00
gewuyou
f33a176570 refactor(core-tests): 提取共享架构上下文测试基类
- 重构 TestArchitectureContext 与 TestArchitectureContextV3 的共享 IArchitectureContext 测试实现到 TestArchitectureContextBase
- 更新 gframework-pr-review 技能规则,要求对已验证成立的 nitpick 进行显式 triage
- 补充 analyzer-warning-reduction 的恢复点与验证记录
2026-04-28 13:23:40 +08:00
gewuyou
a1bfd82945 test(core-tests): 补齐事件上下文回归覆盖
- 补齐 TestArchitectureContext 与 TestArchitectureContextV3 的事件注销与空参数契约回归测试
- 整理 TestResourceLoader 的命名空间缩进以收口局部格式噪音
- 更新 analyzer-warning-reduction 的恢复点与验证记录
2026-04-28 13:00:16 +08:00
gewuyou
9888f80945 docs(ai-plan): 收口PR299剩余追踪归档问题
- 更新 active tracking 与 latest validation,改为记录 PR #299 当前仅剩的 ai-plan review 项。

- 归档 RP-041 到 RP-048 的 trace 时间线,并把 active trace 收敛为恢复点、验证摘要与下一步。

- 补充 PR review 抓取与 docs 站点构建结果,保持本轮收口具备可追溯验证记录。
2026-04-28 11:05:44 +08:00
gewuyou
1635a03a99 fix(tests): 收敛PR300审查遗留问题
- 修复 TestArchitectureContextV3 的共享事件总线语义并补充对应回归测试

- 优化 CapturingLoggerFactoryProvider 的最小级别同步策略并补充验证

- 更新 RegistryInitializationHookBase 异常文档与 analyzer warning reduction 的恢复文档归档
2026-04-28 10:11:05 +08:00
gewuyou
5693ab7e6f fix(test-helpers): 收敛PR300评审问题
- 修复测试架构上下文、生命周期钩子与注册表初始化钩子的评审问题,避免静默成功或错误共享状态

- 补充 TestResourceLoader、TestLogger、CapturingLoggerFactoryProvider 与 CQRS 测试辅助类型的契约文档和并发语义

- 新增测试覆盖并更新 analyzer-warning-reduction 活跃跟踪,记录 PR #300 跟进验证与现存 Cqrs warning blocker
2026-04-28 09:26:20 +08:00
gewuyou
121479835a docs(governance): 收口 PR 审查遗留文档问题
- 修复抽象层入口页与生命周期文档中的语义化导航和初始化入口说明
- 更新教程与排障文档中过时的架构级 Init() 示例,区分 OnInitialize()、InstallModules() 与 OnInit()
- 归档 active tracking 的详细验证历史并补充 RP-048 trace
2026-04-28 08:52:07 +08:00
gewuyou
ba4ace8d40 test(analyzer): 收敛 Core.Tests 与 Cqrs.Tests 警告批次
- 拆分 GameContextTests、ArchitectureServicesTests、RegistryInitializationHookBaseTests 与 Cqrs 测试辅助类型,消除批次内 MA0048 热点
- 修复 Core.Tests 零散可空性、集合抽象和测试辅助 warning,使受影响 Release 构建清零
- 更新 analyzer-warning-reduction 跟踪与 trace,记录 236 条仓库根 warning 基线和 45/50 停止点
2026-04-28 08:32:00 +08:00
gewuyou
98afcbffb3 fix(cqrs-tests): 拆分处理器注册测试辅助类型
- 拆分 CqrsHandlerRegistrarTests 尾部的测试辅助类型到同目录同名文件

- 保持 CQRS handler registrar 测试行为与 XML 文档不变并消除该切片的 MA0048 warning
2026-04-28 07:56:38 +08:00
gewuyou
54530d31d9 test(architectures): 拆分 RegistryInitializationHookBaseTests 辅助类型
- 拆分 RegistryInitializationHookBaseTests 末尾的测试辅助类型到同目录独立文件以消除 MA0048

- 更新 TestRegistry 的公开集合暴露方式为只读接口以规避 MA0016

- 补充新测试辅助类型的 XML 文档并保持原有测试行为不变
2026-04-28 07:50:36 +08:00
gewuyou
a7be41367a fix(core-tests): 消除 GameContextTests 警告
- 拆分 TestArchitecture 与 TestArchitectureContext 到独立测试文件以消除 MA0048
- 修复 TestArchitectureContext 的可空签名以匹配 IArchitectureContext 契约
- 补充测试桩公开成员的 XML 文档并保持 GameContextTests 行为不变
2026-04-28 07:48:55 +08:00
gewuyou
9098490fbb fix(cqrs-tests): 拆分 dispatcher cache 测试辅助类型
- 拆分 CqrsDispatcherCacheTests 末尾的 request、handler 与 behavior 辅助类型到同目录独立文件

- 修复 dispatcher cache 测试中的 ConfigureAwait warning,保持现有断言与分发语义不变
2026-04-28 07:47:28 +08:00
gewuyou
289f12f309 docs(batch-boot): 收口旧入口对比文案
- 更新 Core、Game、Godot 与 source-generators 多个页面的 reader-facing 契约说明

- 将旧文档和旧入口对比句式改成直接陈述当前默认入口、约束与推荐做法

- 补充 documentation full coverage active topic 的 RP-047 跟踪与验证记录
2026-04-28 07:37:20 +08:00
gewuyou
3c0ac1858a docs(batch-boot): 收口公开文档中的内部参考路径
- 更新 Game、Godot 与 source-generators 多个专题页的 reader-facing 示例口吻

- 移除 ai-libs CoreGrid 路径在公开页面中的直接暴露,保留项目侧常见实现说明

- 补充 documentation full coverage active topic 的 RP-046 跟踪与验证记录
2026-04-28 07:37:19 +08:00
gewuyou
0722ba6dbd docs(batch-boot): 收口公开入口页文案
- 更新 source-generators、game、api-reference 与 abstractions 入口页的 reader-facing 标题和导航口吻

- 优化 godot setting 页的继续阅读标题,移除文件名式与指挥式表述

- 补充 documentation full coverage active topic 的 RP-045 跟踪与验证记录
2026-04-28 07:37:19 +08:00
gewuyou
6cc87a9f6c
Merge pull request #298 from GeWuYou/fix/analyzer-warning-reduction-batch
Fix/analyzer warning reduction batch
2026-04-27 20:28:50 +08:00
gewuyou
fbf8f9f0a2 fix(core-tests): 收敛PR298的nitpick问题
- 修复测试辅助类型的只读暴露、空安全和线程安全问题

- 更新异步查询结果命名与init属性XML文档,保持语义一致

- 同步ai-plan恢复点与验证真值,记录PR298 nitpick跟进
2026-04-27 20:18:58 +08:00
gewuyou
f0a36de07c test(core-tests): 批量拆分测试辅助类型以消减警告
- 拆分 GFramework.Core.Tests 中多组测试辅助类型到独立文件以消减 MA0048 warning

- 更新 analyzer-warning-reduction 的 tracking 与 trace 以记录批处理基线和下一恢复点

- 验证 GFramework.Core.Tests Release 构建清零并将仓库根权威 warning 基线压降到 288
2026-04-27 19:44:07 +08:00
gewuyou
26ba3d62f6 test(extensions): 拆分 UnRegisterListExtensionTests 注销列表辅助类型
- 拆分 TestUnRegisterList 到独立文件以消除 MA0048

- 保留测试行为并补充测试替身的 XML 文档说明
2026-04-27 19:12:27 +08:00
gewuyou
843b024718 test(events): 拆分 EventBusTests 事件测试辅助类型
- 拆分 EventBusTestsEvent 到独立文件以消除 EventBusTests.cs 的 MA0048 警告

- 补充提取事件类型的 XML 文档并保持 EventBusTests 行为不变
2026-04-27 19:11:29 +08:00
gewuyou
88c439c2ef test(environment): 拆分 EnvironmentTests 测试环境类型
- 拆分 TestEnvironment 到独立文件以消除 EnvironmentTests 的 MA0048 警告

- 补充 TestEnvironment 的 XML 文档并保留原有测试行为
2026-04-27 19:11:23 +08:00
gewuyou
7b432c60c7 test(coroutine): 拆分 QueryCoroutineExtensionsTests 查询辅助类型
- 拆分 QueryCoroutineExtensionsTests 末尾的 IntQuery、ComplexQuery 与 ComplexResult 到同目录独立文件

- 补充 提取类型的 XML 文档并保持查询测试行为不变
2026-04-27 19:08:07 +08:00
gewuyou
3843e5c1dd test(pool): 拆分 ObjectPoolTests 池化辅助类型
- 拆分 TestObjectPool 与 TestPoolableObject 到 Pool 同目录独立文件

- 保留并补充对象池测试辅助类型的 XML 文档与命名空间一致性

- 验证 GFramework.Core.Tests Release 构建通过且当前切片无新增 warning
2026-04-27 19:07:30 +08:00
gewuyou
0b96f01769 test(cqrs): 拆分容器注册夹具通知类型
- 拆分 DeterministicOrderNotification 与处理器到同目录独立文件以消除 MA0048

- 保留容器注册测试夹具行为与 XML 文档说明
2026-04-27 19:06:58 +08:00
gewuyou
ada0d3acbf test(state): 拆分 StateMachineTests 状态测试辅助类型
- 拆分 StateMachineTests 中的状态测试辅助类型到独立文件

- 补充提取后类型与扩展方法的 XML 文档说明

- 保持状态机测试行为不变并完成定向项目构建验证
2026-04-27 18:47:34 +08:00
gewuyou
7cfdd2cf21
Merge pull request #297 from GeWuYou/fix/analyzer-warning-reduction-batch
Fix/analyzer warning reduction batch
2026-04-27 16:59:57 +08:00
gewuyou
1753778cae fix(game): 修复同步加载阶段的取消透传
- 修复 YAML 同步反序列化与构表阶段的取消处理,避免已取消会话被包装为配置加载失败
- 补充私有同步路径的回归测试,覆盖反序列化与构表阶段的 OperationCanceledException 透传语义
2026-04-27 16:50:44 +08:00
gewuyou
953a03b937 fix(game-tests): 修复取消读取测试的异步警告
- 修复取消读取回归测试的外层 async Task 签名,消除没有 await 的编译警告
- 优化异步异常断言,继续验证取消流程会保留 OperationCanceledException 语义
2026-04-27 16:06:51 +08:00
gewuyou
686647c06b fix(game): 修复 YAML 热重载取消语义
- 修复 ReadYamlAsync 在取消时错误包装异常的问题,并对齐 IntegerTryParseDelegate 的可空性签名

- 更新 Ioc 与 Query 测试辅助类型的 XML 文档,并让 IPrioritizedService 复用 IMixedService 的 Name 契约

- 补充 YamlConfigLoader 取消语义回归测试并同步 analyzer warning reduction 跟踪
2026-04-27 14:26:30 +08:00
gewuyou
99ccc28697
Merge pull request #296 from GeWuYou/docs/sdk-update-documentation
Docs/sdk update documentation
2026-04-27 13:22:54 +08:00
gewuyou
4a5e1e74a6 docs(pr-review): 收口当前文档审查意见
- 更新 Game 与 SourceGenerators README 的公开入口命名和重复链接

- 优化 Godot 教程与扩展页的 reader-facing 措辞

- 补充 PR #296 的治理跟踪与验证记录
2026-04-27 12:49:34 +08:00
gewuyou
a9904a35be fix(warning-reduction): 清理配置与测试切片告警
- 修复 YamlConfigLoader 的超长方法、依赖比较与热重载同步原语告警

- 拆分 MicrosoftDiContainerTests 与 AbstractAsyncQueryTests 的辅助类型文件以消除 MA0048

- 更新 analyzer warning reduction 跟踪文档并记录 non-incremental 构建基线变化
2026-04-27 11:57:49 +08:00
gewuyou
86cfaa7122 test(architectures): 拆分优先级测试辅助类型文件
- 拆分 PriorityServiceTests 末尾的测试接口与辅助类型到独立文件
- 保留原有命名空间、可见性与优先级测试语义
- 补充新文件的 XML 注释并清理原测试文件的无关 using
2026-04-27 11:17:19 +08:00
gewuyou
b6a9fefda9
Merge pull request #295 from GeWuYou/fix/analyzer-warning-reduction-batch
Fix/analyzer warning reduction batch
2026-04-27 10:53:34 +08:00
gewuyou
067d72fada fix(tooling): 收口PR评审遗留nitpick
- 修复 PR review 脚本对 failed-test 额外列表格的解析容错

- 清理 AsyncExtensionsTests 中多余的等待并保留参数名断言

- 补充脚本回归测试并同步 analyzer-warning-reduction 恢复点
2026-04-27 10:22:45 +08:00
gewuyou
1c87272f6b fix(tooling): 补全PR测试报告解析并修复并发测试
- 更新 gframework-pr-review 脚本以提取 CTRF 测试摘要和失败用例详情

- 修复 SettingsModelTests 在 NET9+ 下错误使用 Monitor 持锁的并发测试语义

- 同步 analyzer-warning-reduction 的 active todo 与 trace 真值
2026-04-27 09:53:12 +08:00
gewuyou
1f560635a8 fix(analyzer): 收口PR评审遗留问题
- 修复 AsyncExtensionsTests 中 ArgumentException 的 ParamName 传递与断言契约

- 更新 analyzer warning reduction 的 active todo 与 trace 真值

- 归档 RP073-RP078 的历史恢复文档以收紧当前入口
2026-04-27 09:19:13 +08:00
gewuyou
5778782df0 docs(godot): 收口旧文档口吻与采用说明
- 更新 Godot 与教程细页的 reader-facing 采用说明

- 修复旧文档、ai-libs 与内部术语在公开页面中的暴露

- 更新文档治理恢复点并记录接近阈值的停止状态
2026-04-27 09:02:48 +08:00
gewuyou
979db3b5a5 docs(reader-facing): 统一站内入口与公开术语
- 更新入口页的 reader-facing 骨架,统一起步路线、阅读顺序与站内导航
- 收口公开 README 与 Godot 页面中的内部口吻、文件名式表述和术语噪音
- 移除 docs/zh-CN 中残留的 GitHub README 外链,并同步刷新文档治理恢复状态
2026-04-27 08:55:18 +08:00
gewuyou
72ebd266d3 docs(analyzer): 同步第三轮警告清理恢复点
- 更新 analyzer-warning-reduction 跟踪文档的第三轮结果与最新 stop-condition 指标

- 记录 Core.Tests 批次验证结果与默认收口建议
2026-04-27 08:15:36 +08:00
gewuyou
e19e60ea1a fix(core-tests): 修复 AsyncKeyLockManagerTests 的 MA0004 warning
- 修复 Task.Run 内 await using 的异步释放上下文捕获 warning
- 保持 AsyncKeyLockManager 并发测试语义与可读性不变
2026-04-27 08:09:35 +08:00
gewuyou
650618b5ab fix(core-tests): 修复 PauseStackManagerTests 锁分析器警告
- 修复 PauseStackManagerTests 并发测试中的锁声明,针对 net9 以上使用专用 Lock。

- 保持 net8.0 回退到 object 锁,确保多目标兼容且测试行为不变。
2026-04-27 08:09:26 +08:00
gewuyou
946cdbb9d2 fix(analyzer): 收口第二轮游戏侧警告清理
- 修复 SettingsModel 与 GameConfigBootstrap 的残留 MA0158 专用锁警告

- 更新 analyzer-warning-reduction 恢复点与第二轮构建验证结果
2026-04-27 08:06:27 +08:00
gewuyou
9ce634ed1c refactor(game): 拆分配置热重载启动流程
- 重构 GameConfigBootstrap 的热重载启动流程,提取状态准备、结果提交与失败回滚辅助方法

- 保持现有锁保护、异常路径与监听句柄释放语义不变,消除 StartHotReload 的 MA0051 warning
2026-04-27 08:00:17 +08:00
gewuyou
9deafac234 fix(game): 清理路由与 UI 交互配置的 analyzer warning
- 修复 RouterBase 中路由键比较的 MA0006,显式使用 Ordinal 字符串比较

- 修复 UiInteractionProfiles 中位掩码判定的 MA0099,改为与显式枚举值比较
2026-04-27 07:59:27 +08:00
gewuyou
c106e53a74 fix(game): 修复 SettingsModel 的 MA0004 警告
- 修复 SettingsModel 中异步仓储加载与保存流程缺少 ConfigureAwait(false) 的 analyzer 警告

- 保持设置模型初始化、保存、应用阶段的生命周期与事件触发语义不变
2026-04-27 07:58:22 +08:00
gewuyou
fb0a55f435 fix(analyzer): 收口首轮并行警告清理
- 修复 Core 与 Cqrs 中资源、日志、配置缓存的 MA0158 专用锁警告

- 修复 SaveRepository 与 SceneRouterBase 的残留分析器警告

- 更新 analyzer-warning-reduction 跟踪文档与最新构建验证结果
2026-04-27 07:54:43 +08:00
gewuyou
5befaf707b docs(ai-plan): 更新文档治理恢复状态
- 更新文档治理 tracking 的 branch diff 指标与当前工作树状态
- 补充本轮提交后的下一步恢复建议
2026-04-27 07:44:10 +08:00
gewuyou
8f2d95910e fix(core): 迁移 MA0158 专用锁实现
- 迁移 Events、Property、State 与 Coroutine 中 7 个类型的监视器字段到 NET9_0_OR_GREATER 专用 Lock 模式
- 保持 net8.0 的 object 回退路径以兼容多目标构建
- 更新 BindableProperty 的同步注释以匹配新的多目标同步原语
2026-04-27 07:42:20 +08:00
gewuyou
1454c81a5b docs(adoption): 收口安装入口与公开文案
- 更新安装页的选包矩阵、推荐组合与 Godot 基线说明
- 收口公开 README 的 XML 阅读入口表述,移除治理式计数与日期字段
- 调整配置系统与基础教程入口的 reader-facing 文案,并同步更新恢复文档
2026-04-27 07:42:10 +08:00
gewuyou
e3eec5452c fix(game): 修复数据仓库与场景路由分析器警告
- 修复数据仓库异步存储调用的 ConfigureAwait(false) 使用,消除目标 MA0004 警告

- 更新 UnifiedSettingsDataRepository 的字符串键字典 comparer 为 StringComparer.Ordinal,消除目标 MA0002 警告

- 保留场景切换流程在当前上下文继续执行,并显式使用 ConfigureAwait(true) 说明上下文约束
2026-04-27 07:41:10 +08:00
gewuyou
7e13752bb1 fix(game): 修复 UiRouterBase 分析器警告
- 修复 UiRouterBase 中缺少参数名的 ArgumentException 调用

- 更新 UI 键比较与层级字典为 Ordinal 语义,消除字符串与比较器相关警告
2026-04-27 07:40:46 +08:00
gewuyou
617e0bffd2
Merge pull request #294 from GeWuYou/feat/semantic-release-versioning
ci(release): 修复 semantic-release 预览鉴权
2026-04-26 12:17:15 +08:00
gewuyou
f777cdebd7 ci(release): 收敛 PAT 校验并归档迁移跟踪
- 新增复用的 PAT 校验 composite action,并统一 preview 与 release 的鉴权入口

- 修复 read-only PAT 会误过 API 探活的问题,提前校验 push 权限并清理临时文件

- 归档 semantic-release 迁移历史完成项,精简 active tracking 与 trace 恢复点
2026-04-26 11:59:06 +08:00
gewuyou
195658a217 ci(release): 修复 semantic-release 预览鉴权
- 修复 preview job 在 dry-run 中改用 PAT_TOKEN 并提前校验仓库访问权限
- 补充 preview summary 对远端 push 权限探测行为的说明
- 更新 semantic-release versioning 的 tracking 与 trace 恢复点和验证记录
2026-04-26 11:27:41 +08:00
gewuyou
524d54d3de
Merge pull request #293 from GeWuYou/feat/semantic-release-versioning
Feat/semantic release versioning
2026-04-26 11:15:23 +08:00
gewuyou
9f04c0b5f8 fix(release): 修复语义化发版审查问题
- 修复 semantic-release 配置,切换到 conventionalcommits preset 并显式声明 breaking、revert、patch 语义

- 更新 auto-tag workflow,补充 preview 成功守卫、PAT 存活性校验、snapshot 说明与 release notes summary 输出

- 更新 AGENTS 与 semantic-release topic 的 tracking/trace,记录当前发版规则、验证结果与恢复点
2026-04-26 10:36:27 +08:00
gewuyou
3ca095e987 chore(pr-review): 支持 Gemini reviewer 审查
- 新增 gemini-code-assist reviewer 到 PR review 抓取脚本的受支持列表并输出汇总信息

- 更新 gframework-pr-review skill 文档,补充 Gemini reviewer 的工作流、输出预期和触发示例
2026-04-26 10:26:09 +08:00
gewuyou
16e04cc541 build(release): 调整为同次运行预览后审批发版
- 重构 semantic-release workflow 为 preview 预览后经 environment 审批继续 release

- 绑定同一 SHA 的 preview 与 release 结果并在 summary 中展示版本信息

- 更新 semantic-release 迁移跟踪文档记录新的审批式发版链路
2026-04-26 10:10:53 +08:00
gewuyou
d7ddff9f53 build(release): 收紧手动发版入口与提交语义约束
- 重构 semantic-release workflow 为 preview 与 release 两种手动触发模式

- 更新 AGENTS 中的 Conventional Commit 规则并禁止 feat(docs) 这类文档提交类型

- 补充 semantic-release 迁移跟踪与二次验证记录
2026-04-26 09:49:14 +08:00
gewuyou
b194238385 build(release): 迁移语义化版本打标流程
- 新增 semantic-release 配置并固定 release rules 与 v 前缀 tag 格式

- 重构 auto-tag workflow 为 main 上的真实打标与 workflow_dispatch dry-run 双入口

- 保留现有 publish workflow 并补充 ai-plan 跟踪与验证记录
2026-04-26 09:42:18 +08:00
gewuyou
3446896118
Merge pull request #292 from GeWuYou/docs/sdk-update-documentation
docs: clarify meta-package scope, source generator contracts, and add Game config tool documentation
2026-04-26 09:41:36 +08:00
gewuyou
0c7552e629
Merge pull request #291 from GeWuYou/fix/analyzer-warning-reduction-batch
Fix/analyzer warning reduction batch
2026-04-26 09:01:04 +08:00
gewuyou
65d3634181 docs(config-tool): 补充配置工具最小接入路径
- 补充 config tool README 的 Quick Start 最小接入步骤并统一 schema subset 术语
- 更新 documentation-full-coverage-governance 的 tracking 与 trace,记录 PR #292 最新 review 结论和验证结果
- 补充工具模块的测试与 VSIX 打包验证结果,作为本轮 review 收口的最小验证证据
2026-04-26 08:55:48 +08:00
gewuyou
3a3359b495 docs(ai-plan): 脱敏 analyzer warning 跟踪路径记录
- 更新 analyzer-warning-reduction active todo/trace 的 PR review 真值与恢复点
- 脱敏 archive trace 中的临时输出路径与 Windows fallback package folder 记录
- 补充 dotnet build 验证结果并保持 639 Warning(s) 基线说明
2026-04-26 08:27:24 +08:00
gewuyou
c39cb5c9dc docs(ai-plan): 收口 PR291 剩余文档 review
- 归档 RP-062 至 RP-071 的 active trace 详细记录并缩短默认恢复入口

- 更新 analyzer warning tracking 文档的验证真值维护位置并同步最新 PR review 状态
2026-04-25 22:07:12 +08:00
gewuyou
d3d62cf454 docs(review): 收口 PR 文档评审意见
- 优化源码生成器总览页的共享支撑模块说明句式

- 更新 config tool README,补充中文接入文档入口

- 记录 PR #292 最新 review 状态与验证结果
2026-04-25 20:14:03 +08:00
gewuyou
1b199e9f17 fix(ai-plan): 同步 PR291 活跃恢复文档
- 更新 active todo 到 RP-071 并同步 .codex / .gitignore 当前真值\n- 补充 PR #291 latest-head review 复核结果与本轮完成校验记录\n- 保留 non-blocking nitpick 作为后续独立文档收口项
2026-04-25 20:01:07 +08:00
GeWuYou
67675a02f7 chore(git): 添加 .codex 到 git 忽略列表
- 在 .gitignore 文件中添加 .codex 条目
- 防止 .codex 目录被意外提交到版本控制系统
2026-04-25 17:24:24 +08:00
gewuyou
a75194337e fix(pr-review): 收口当前 PR 仍有效的 review 建议
- 修复 AGENTS 中 latest-head review thread 指向的英文标点一致性问题

- 删除 MediatorAdvancedFeaturesTests 中未使用的 TestLoggingBehavior 测试基础设施

- 重构 VersionedMigrationRunner 的迁移执行上下文传递并补充对应 XML 文档

- 更新 analyzer warning reduction 的 active tracking 与 trace,记录 PR #291 复核结果和 639 条根构建基线
2026-04-25 17:18:01 +08:00
gewuyou
b96565ffa3 docs(documentation): 扩展项目功能文档覆盖
- 更新 meta-package 与安装入口,明确聚合范围、当前运行时基线和首页选包路径
- 补充 Game 配置工具文档与导航,把 VS Code config workflow 纳入 reader-facing 采用链路
- 修正文档与实现不一致的 source-generator 与 CQRS 契约说明,补充 support module 边界
- 记录 RP-038 批处理恢复点、委派结论和本轮验证结果
2026-04-25 17:10:37 +08:00
gewuyou
10daba3add docs(documentation): 收口贡献指南代码块警告
- 修复 contributing 文档中的 Mermaid 示例围栏写法,消除剩余代码块语言警告
- 更新 documentation-full-coverage-governance 的 tracking 与 trace,记录 RP-037、基线和验证结果
2026-04-25 16:33:34 +08:00
gewuyou
79934f79b0
Merge pull request #290 from GeWuYou/docs/sdk-update-documentation
Docs/sdk update documentation
2026-04-25 16:15:55 +08:00
gewuyou
074002254e docs(pr-review): 收口文档审查反馈
- 更新 source-generators 侧栏标签并移除 API 参考侧栏中的跨栏目重复入口

- 优化 Core、Ecs.Arch、Game README 的 XML 阅读入口表述,删除覆盖基线式字段

- 补充 documentation-full-coverage-governance 跟踪与验证记录,记录 PR #290 审查收口状态
2026-04-25 16:08:23 +08:00
gewuyou
4edfe53cd9 test(cqrs-tests): 收敛测试日志与行为集合抽象 warning
- 修复 TestLogger 与 MediatorAdvancedFeaturesTests 的集合抽象暴露问题,保持测试语义不变

- 更新 analyzer warning reduction 的 active tracking 与 trace,记录新的 640 条根构建基线和委派范围
2026-04-25 15:54:27 +08:00
gewuyou
58ba6c011e test(cqrs-tests): 收敛处理器注册缓存测试 warning
- 重构 CqrsHandlerRegistrarTests 的缓存元数据用例,拆分装配、断言与 verify helper

- 更新 analyzer warning reduction 的 active tracking 与 trace,记录并行 subagent 批次和 645 条根构建基线
2026-04-25 15:39:32 +08:00
gewuyou
9f6204d6e2 fix(core-tests): 收口 LoggerTests 日志集合抽象
- 修复 TestLogger.Logs 暴露 List<LogEntry> 实现类型导致的 MA0016 warning
- 保持测试桩内部写入顺序和现有测试访问方式不变
2026-04-25 15:30:09 +08:00
gewuyou
a7fa70e4fe fix(core-tests): 清理 LogContextTests 异步等待 warning
- 修复异步测试中的 await 链 MA0004 warning

- 保持 LogContext 在线程隔离场景下的断言行为不变
2026-04-25 15:29:26 +08:00
gewuyou
1b85b53292 refactor(game): 收敛版本化迁移运行器长方法 warning
- 重构 VersionedMigrationRunner 的迁移主循环,拆分版本校验、迁移解析与结果校验 helper

- 更新 analyzer warning reduction 的 active tracking 与 trace,记录新的 649 条根构建基线
2026-04-25 15:25:57 +08:00
gewuyou
be26640b58 test(game-tests): 收敛热重载长方法 warning
- 重构 YamlConfigLoaderTests 的热重载夹具与回调接线,消化 4 个 MA0051 长方法警告
- 更新 analyzer-warning-reduction active todo 与 trace,记录 652 条根构建 warning 的新基线
- 保持 GFramework.Game.Tests 的 Release build 为 0 Warning 和 0 Error
2026-04-25 15:13:22 +08:00
gewuyou
54b8e5770a docs(documentation): 收口文档批处理治理
- 优化根 README、模块 README 与抽象层页面的 reader-facing 文案和语义化链接标签

- 补充 tutorials、troubleshooting、best-practices、contributing、godot/resource 的代码块语言标记

- 更新 documentation-full-coverage-governance 的恢复点、验证结果与批处理停止条件
2026-04-25 15:12:08 +08:00
gewuyou
6a704f3aa7 fix(analyzer): 固化沙箱外验证并清理测试噪音
- 更新 AGENTS.md,要求沙箱内 .NET 验证异常时必须申请沙箱外重跑同一命令并以其结果为准
- 修复 4 个测试文件中的冗余 DoesNotThrow 包装,收敛低风险 warning 噪音
- 刷新 analyzer-warning-reduction active todo 与 trace,清理把沙箱噪音当成环境阻塞的恢复信息
2026-04-25 14:58:06 +08:00
gewuyou
094e29ed8b docs(docs): 统一中文文档导航与语义化链接文案
- 更新 docs 站点中 abstractions、source-generators、api-reference 的导航文案,使其与 landing page 入口一致

- 补充遗漏的源码生成器 sidebar 条目,并本地化抽象层与 API 参考的侧边栏标签

- 修复 ECS、Game、Godot 文档中的路径式可见链接标签,改为读者可理解的语义化名称
2026-04-25 14:56:59 +08:00
gewuyou
4ad880c1e3
Merge pull request #288 from GeWuYou/fix/analyzer-warning-reduction-batch
Fix/analyzer warning reduction batch
2026-04-25 14:35:38 +08:00
gewuyou
0161852618
Merge pull request #289 from GeWuYou/docs/sdk-update-documentation
Docs/sdk update documentation
2026-04-25 14:27:03 +08:00
gewuyou
a7a3eca40d fix(pr-review): 收敛PR建议并修复构建验证
- 修复 PR #288 中经本地复核后仍成立的 Core、Game 与测试建议

- 更新 WSL 标准 dotnet build 验证路径并确认 Release 构建可通过

- 补充 analyzer-warning-reduction 跟踪文档记录本轮结论与恢复点
2026-04-25 14:26:49 +08:00
GeWuYou
70c42b579f fix(scene): 修复场景替换核心异步执行的配置问题
- 将 ConfigureAwait 参数从 false 修改为 true
- 确保异步操作在正确的上下文中继续执行
- 避免潜在的死锁或性能问题
2026-04-25 13:11:45 +08:00
gewuyou
4740d30fb7 fix(core): 修复 PR 评审指出的编译与样式问题
- 修复 AsyncExtensionsTests 中错误返回 ConfiguredTaskAwaitable 导致的测试编译失败

- 收敛多处测试中的冗余 async/await 与 ValueTask 断言包装,减少 PR review 指出的告警

- 更新 StoreSelection 的 net9+ 锁实现与 analyzer-warning-reduction 跟踪文档,记录 PR #288 与当前 MSB4018 环境阻塞
2026-04-25 13:03:17 +08:00
gewuyou
c95545db92 docs(ai-plan): 同步文档治理恢复点
- 更新 tracking 与 trace 的 branch diff 实际值和后续恢复建议

- 记录本轮 README 与代码块标记批次已经提交完成
2026-04-25 11:47:52 +08:00
gewuyou
9dfee7538d docs(documentation): 补齐文档代码块标记
- 补齐 Core 热点页与基础教程页的 fenced code block 语言标记

- 更新 documentation-full-coverage-governance 的 tracking 与 trace,记录 RP-034 和 50 文件阈值
2026-04-25 11:46:17 +08:00
gewuyou
bd5cdb561f docs(readme): 优化链接标签
- 更新 5 个模块 README 的 reader-facing 链接标签,去掉裸路径和文件名式文案

- 保持原有链接目标、章节结构与正文语义不变
2026-04-25 11:35:25 +08:00
gewuyou
984fb21b94
Merge pull request #287 from GeWuYou/docs/sdk-update-documentation
docs(documentation): 收口公开文档口吻约束
2026-04-25 11:11:56 +08:00
gewuyou
18bf9f6730 docs(api-reference): 统一文档入口标签写法
- 修复 API 参考页站内入口标签风格不一致的 PR review 问题
- 更新 active tracking 与 trace,记录 PR #287 抓取结果和验证状态
- 补充 docs 构建验证结论,保持当前恢复点与后续动作同步
2026-04-25 10:50:38 +08:00
gewuyou
be336b2088 docs(ai-plan): 修正 analyzer warning reduction 指标
- 更新 active tracking 与 trace 中的当前 branch line 统计

- 将恢复点表述改为代码 stop commit 以避免后续 docs 提交导致失真
2026-04-25 10:48:13 +08:00
gewuyou
e9cd41da86 docs(ai-plan): 更新 analyzer warning reduction 恢复点
- 更新 active tracking 与 trace 到 RP-062 并收口到当前真值

- 记录本轮已达到 75 files 阈值的停止结论与最新 branch 指标

- 补充 Core build 通过结果与 Core.Tests 的 MSB4276 环境阻塞说明
2026-04-25 10:45:00 +08:00
gewuyou
9ce1fa630c refactor(core): 收敛 Core 扩展与测试的机械 warning
- 更新 ContextAware、Store 与通用扩展中的参数空校验写法以满足 analyzer 约束

- 简化 coroutine、pause、log 与 async 测试中的等待和断言包装并保持测试语义不变

- 调整测试替身异常类型与 Result 系列断言样例以减少低风险 warning 噪音
2026-04-25 10:38:48 +08:00
gewuyou
03c73a8ee5 test(core-tests): 收敛测试桩与辅助类型 warning
- 更新 ArchitectureContext、ArchitectureServices、GameContext 与环境测试桩的异常类型以满足 analyzer 约束

- 补齐 AsyncTestModel 与 AsyncTestSystem 的异步等待配置并保持测试语义不变

- 调整 ResultTests 的异类异常断言样例以避免新增编译与 analyzer 噪音
2026-04-25 10:18:40 +08:00
gewuyou
b45e551fa8 test(core-tests): 收敛选项与扩展测试的基础 warning
- 更新 OptionTests 中的 culture-sensitive 转换与 TryParse 写法
- 修正 AsyncExtensionsTests 与 CollectionExtensionsTests 的低风险异步和字符串比较写法
2026-04-25 10:12:35 +08:00
gewuyou
b7560fcc08 test(core-tests): 收敛函数式与状态测试的低风险 warning
- 补齐 WaitForTask、ResourceManager、State 与 StateMachine 测试中的低风险 ConfigureAwait(false)
- 更新 AsyncKeyLock、ResultExtensions、ResultT 与 Pipe 测试中的 culture 和异步等待写法
2026-04-25 10:08:59 +08:00
gewuyou
737d0b5037 test(core-tests): 显式指定日志测试字符串比较器
- 为 LogEntryTests 与格式化器测试中的字符串字典补充 StringComparer.Ordinal
- 保持日志相关测试断言与行为路径不变
2026-04-25 10:03:26 +08:00
gewuyou
6188876570 test(core-tests): 规范字符串比较断言写法
- 优化 ContextAwareServiceExtensionsTests 中的字符串相等断言,显式使用 Ordinal 比较
- 优化 RollingFileAppenderTests 中的 StartsWith、EndsWith、排序比较与文件名判等写法,补充 Ordinal 比较并保持测试语义不变
2026-04-25 10:01:26 +08:00
gewuyou
f67b2cedb2 refactor(core-tests): 显式指定字符串字典比较器
- 补充 LocalizationTableTests 中 string key Dictionary 的 Ordinal comparer

- 补充 QueryCoroutineExtensionsTests 中 Metadata 字典的 Ordinal comparer 并保持测试语义不变
2026-04-25 10:01:05 +08:00
gewuyou
2a9e9f26c7 test(game-tests): 简化架构配置集成测试异步断言
- 简化 ArchitectureConfigIntegrationTests 中的异步异常断言包装
- 保持重复初始化场景的测试语义与验证路径不变
2026-04-25 09:56:32 +08:00
gewuyou
65cd23ff3e test(core-tests): 简化结果与协程异步断言包装
- 简化 ResultExtensionsTests 中的异步异常断言包装
- 更新 AsyncOperationTests 的 Task 断言写法以消除低风险 analyzer 噪音
2026-04-25 09:55:10 +08:00
gewuyou
ffd62bb475 docs(ai-plan): 更新 analyzer-warning-reduction 恢复点
- 更新 analyzer-warning-reduction 跟踪文档到 RP-061 并记录当前 HEAD 与 branch diff 真值
- 补充最近批次的验证结论与当前 subagent 恢复入口
2026-04-25 09:51:37 +08:00
gewuyou
0d8f854dd2 refactor(core-tests): 简化状态机异步断言包装
- 简化 StateMachineSystemTests 中的 Task 异常断言包装

- 简化 StateMachineTests 中的异步异常断言包装并保持测试语义不变
2026-04-25 09:49:20 +08:00
gewuyou
67c9359fd2 test(core-tests): 简化异步断言包装
- 简化 Architecture、Command、Query 与 AsyncArchitecture 测试中的机械型 async/await 异步断言包装
- 更新 AsyncKeyLockManagerTests 中的 Task 断言写法以消除低风险 analyzer 噪音
2026-04-25 09:46:44 +08:00
gewuyou
9b20a07c0a refactor(game-tests): 简化异步异常断言包装
- 简化 YAML 配置加载测试中的 Assert.ThrowsAsync Task 包装

- 简化持久化测试中的异步异常断言包装并保持原有断言语义
2026-04-25 09:43:32 +08:00
gewuyou
09cbd16d3a test(game-tests): 简化 YAML 配置加载异常断言包装
- 优化 allOf、enum、not 测试中的 Assert.ThrowsAsync 委托写法,移除冗余 async/await 包装
- 保持 schema 用例语义、断言内容和异常路径不变
2026-04-25 09:43:10 +08:00
gewuyou
3be299e6f1 fix(game): 清理 UiRouterBase 的低风险异步包装
- 调整 UiRouterBase 的异步过渡调用以显式保留同步上下文

- 清理 Push Pop Replace Clear 流程中的低风险 MA0004

- 保持 UI 生命周期顺序与过渡阶段语义不变
2026-04-25 09:38:09 +08:00
gewuyou
e8eda8170c fix(routing): 清理 RouterBase 守卫异步等待的 MA0004
- 修复 RouterBase 进入守卫异步调用缺少 ConfigureAwait(false) 的机械型 MA0004
- 修复 RouterBase 离开守卫异步调用缺少 ConfigureAwait(false) 的机械型 MA0004
2026-04-25 09:35:33 +08:00
gewuyou
bad6c1b108 fix(game): 清理 FileStorage 异步存储路径的 MA0004
- 修复 FileStorage 在锁获取与异步释放路径上的 ConfigureAwait(false) 缺失
- 保持文件锁、临时文件写入和原子替换流程不变
2026-04-25 09:34:19 +08:00
gewuyou
4bb8f4f429 fix(game): 清理 SceneRouterBase 低风险异步包装
- 重构 Replace、Push、Pop、Clear 的 around pipeline 核心委托,移除匿名 async 包装

- 补充 BeforeChange 与 AfterChange 的 ConfigureAwait(false),收敛明显低风险 MA0004

- 保留场景生命周期与栈操作相关 await 的默认上下文行为,并在代码中说明原因
2026-04-25 09:32:54 +08:00
gewuyou
64c8589489 fix(game): 清理 SettingsSystem 与 ScopedStorage 的 MA0004
- 修复 SettingsSystem 中不依赖上下文的 await,补充 ConfigureAwait(false)
- 修复 ScopedStorage.DeleteAsync 的 await,保持作用域前缀语义不变
2026-04-25 09:29:01 +08:00
gewuyou
8209d7a29f docs(documentation): 收口公开文档口吻约束
- 修复公开 README 与 docs 页面中的反问式标题、维护者口吻和裸文件名链接标签
- 补充 AGENTS.md 与 gframework-doc-refresh 的 reader-facing 文档输出约束
- 更新 documentation-full-coverage-governance 的恢复点与验证记录
2026-04-25 09:27:06 +08:00
gewuyou
425c22d98f docs(ai-plan): 更新 analyzer-warning-reduction 恢复点
- 更新 analyzer-warning-reduction 的 RP-060 跟踪与 trace

- 记录并行 warning-reduction 批次的验证结果与当前分支体积

- 补充下一轮继续朝 75 文件阈值推进的恢复建议
2026-04-25 09:24:44 +08:00
gewuyou
b27bcb5832 refactor(game-tests): 清理指定加载测试的 MA0051
- 重构四个纯加载测试的固定布置为文件内私有 helper,缩短方法体长度而不改变断言语义

- 保持 schema 内容、异常路径与 item/monster 注册顺序不变,并避免触碰热重载测试
2026-04-25 09:20:29 +08:00
gewuyou
27f5a2f58e fix(game): 清理切换管道中的低风险 MA0004
- 修复 Scene 与 UI 过渡管道中间件链的多余 async 包装

- 更新低风险 await 调用以显式使用 ConfigureAwait(false)
2026-04-25 09:20:00 +08:00
gewuyou
1dae0b11a0 test(game-tests): 清理配置测试中的机械型 MA0004 包装
- 修复三个配置测试文件中 Assert.ThrowsAsync 与 Assert.DoesNotThrowAsync 的冗余 async/await 包装
- 调整文本校验异步异常测试签名以匹配去包装后的同步断言写法
2026-04-25 09:19:11 +08:00
gewuyou
877d1f38a6 fix(godot-tests): 清理模块安装测试异步断言包装
- 修复 Assert.ThrowsAsync 中机械型 async 包装\n- 保持锚点缺失场景的异常与未安装断言语义不变
2026-04-25 09:17:22 +08:00
gewuyou
b56e08adae fix(analyzer): 清理 YamlConfigLoaderTests 的异步等待 warning
- 修复 YamlConfigLoaderTests 中 Assert.ThrowsAsync 的冗余 async/await 写法

- 补充 WaitForTaskWithinAsync 的 ConfigureAwait(false) 以消除剩余 MA0004

- 更新 analyzer-warning-reduction 的 RP-059 跟踪与验证记录
2026-04-25 08:27:32 +08:00
gewuyou
9964962416
Merge pull request #286 from GeWuYou/fix/analyzer-warning-reduction-batch
Fix/analyzer warning reduction batch
2026-04-24 23:05:53 +08:00
gewuyou
1e5ca14620 fix(godot): 修复场景行为格式问题
- 修复 SceneBehaviorBase 中暂停、恢复、卸载方法的缩进,消除 PR review 指向的格式问题
- 更新 analyzer-warning-reduction 的 tracking 与 trace,记录 PR #286 latest-head review 跟进和验证结果
- 补充 GFramework.Godot 的 Release build 与 dotnet format verify 结论,保留后续 warning reduction 恢复点
2026-04-24 22:18:23 +08:00
gewuyou
608e639c0f
Merge pull request #285 from GeWuYou/docs/sdk-update-documentation
docs(documentation): 优化文档入口标题与导航标签
2026-04-24 20:36:57 +08:00
gewuyou
2b70734357 fix(game-tests): 清理持久化测试残余告警
- 修复 PersistenceTests 中统一设置仓库失败场景测试的剩余 ConfigureAwait 告警\n- 验证 PersistenceTests 不再出现在非增量 GFramework.Game.Tests 构建告警输出中\n- 更新 analyzer warning reduction 的 tracking 与 trace,记录 RP-057 验证结果和当前分支体积
2026-04-24 20:05:14 +08:00
gewuyou
56ed66976b fix(game-tests): 清理生成配置消费者测试告警
- 修复 GeneratedConfigConsumerIntegrationTests 的 raw string 缩进和方法边界,恢复编译通过\n- 重构生成配置消费者集成测试的断言辅助方法,清理该文件剩余 warning\n- 更新 analyzer warning reduction 的 tracking 与 trace,记录 RP-056 验证结果和当前分支体积
2026-04-24 19:31:37 +08:00
gewuyou
5aefd77ad0 fix(game-tests): 收敛配置与序列化测试告警
- 修复架构配置、启动流程与序列化测试中的异步等待和 invariant 解析告警

- 补充 AllOf 与 persistence 测试的残余状态校验与 ConfigureAwait 修正,继续压低 Game.Tests warning

- 更新 analyzer-warning-reduction 跟踪与 trace,纠正 RP-054 的 stop-condition 口径并记录 RP-055 指标
2026-04-24 18:29:17 +08:00
gewuyou
36507bbc52 fix(game-tests): 收敛 Game.Tests 测试告警
- 修复多组 YAML 与 persistence 测试中的 ConfigureAwait 使用与状态校验,清理低风险 analyzer 告警

- 重构 PersistenceTestUtilities 为单类型文件,消除测试辅助模型的文件命名告警

- 更新 analyzer-warning-reduction 跟踪与 trace,记录 RP-054 批次结果与 75 文件阈值停止点
2026-04-24 18:17:21 +08:00
gewuyou
0db50107f7 docs(documentation): 优化文档入口标题与导航标签
- 更新根 README 的内部支撑模块入口标签,避免继续暴露路径式链接名

- 优化 docs/zh-CN 多个 landing 与 core 页面标题,提升中文读者的导航可读性

- 同步 documentation-full-coverage-governance 的 tracking 与 trace,记录最新 baseline 和验证结果
2026-04-24 18:07:07 +08:00
gewuyou
4c2994ee52
Merge pull request #284 from GeWuYou/docs/sdk-update-documentation
Docs/sdk update documentation
2026-04-24 17:57:23 +08:00
gewuyou
6ff07ad3d9 fix(godot): 清理 Godot 模块与测试项目告警
- 优化 GodotYamlConfigEnvironment 目录枚举逻辑,拆分 helper 以消除 MA0051

- 修复 Godot 生命周期 await 的上下文声明,显式保留主线程同步上下文

- 更新 Godot.Tests 异步断言与字符串 comparer,用例项目构建收敛到 0 warning(s)

- 补充 analyzer-warning-reduction 跟踪与 trace,记录 RP-053 的批次结果与验证
2026-04-24 17:04:53 +08:00
gewuyou
63f563cd49
Merge pull request #283 from GeWuYou/fix/analyzer-warning-reduction-batch
Fix/analyzer warning reduction batch
2026-04-24 16:51:03 +08:00
gewuyou
546e6c7b11 docs(pr-review): 收口评审遗留文档措辞
- 更新 Core 与 Core.Abstractions README 的 reader-facing 文案,移除公开入口中的 inventory 表述
- 修复仓库根 README 的贡献指引范围,明确同步受影响的中文文档页面
- 补充 active tracking 与 trace 的 PR #284 follow-up 恢复点和验证结果
2026-04-24 16:45:48 +08:00
gewuyou
2187f179c3 fix(pr-review): 修复设置快照比较器契约
- 修复 UnifiedSettingsFile 与 UnifiedSettingsDataRepository 的 comparer 契约,在无法恢复原比较器时显式回退到 StringComparer.Ordinal
- 统一 AutoRegisterExportedCollectionsGeneratorTests 中剩余的 RunAsync 异步等待写法,并补齐 ConfigureAwait(false)
- 更新 analyzer-warning-reduction 跟踪文档,记录 PR follow-up 的验证结果与恢复点
2026-04-24 16:39:25 +08:00
gewuyou
7e45197698 test(godot-source-generators): 清理源生成器测试项目警告
- 重构 GFramework.Godot.SourceGenerators.Tests 的测试模板与诊断辅助,清除项目内全部 analyzer warning
- 更新 GeneratorTest 异步等待与 analyzer-warning-reduction 跟踪文档,记录批次验证结果与恢复点
2026-04-24 14:06:41 +08:00
gewuyou
a439fb8f4e refactor(godot-source-generators): 清理生成器告警与构建基线
- 重构 Godot source generator 的长方法与字符串比较逻辑,清理 GFramework.Godot.SourceGenerators 的 MA0051 和 MA0006 告警

- 更新 AutoRegisterExportedCollectionsGenerator 的注册解析阶段拆分,消除剩余的长方法告警

- 更新 AGENTS 与 analyzer-warning-reduction 跟踪文档,明确 warning 检查必须先 clean 再 build
2026-04-24 13:25:42 +08:00
gewuyou
77540c07f0 docs(readme): 对齐文档入口标签与落地页元数据
- 更新模块 README、仓库根 README 与中文落地页的 reader-facing 文档入口标签
- 补充 docs 语言落地页 metadata 并校正文档治理 topic 的恢复点与阈值指标
2026-04-24 13:23:15 +08:00
gewuyou
64385196d5 docs(zh-cn): 统一站内链接显式扩展名
- 更新教程、最佳实践、Core 与 Godot 页面中的站内 Markdown 链接写法
- 补充文档治理 topic 的恢复点、验证结果与分支阈值指标
2026-04-24 13:10:41 +08:00
GeWuYou
25d33d0bf9 chore(build): 更新项目配置以启用代码分析并修改许可证
- 移除测试项目的警告级别设置
- 将包许可证从 MIT 更改为 Apache-2.0
- 为 GFramework 项目启用 .NET 代码分析器
- 保持目标框架 net8.0、net9.0 和 net10.0 的支持
2026-04-24 13:08:11 +08:00
gewuyou
b710f31b86 docs(workflow): 更新构建告警检查约定
- 更新 AGENTS.md,明确使用 plain dotnet build 作为默认构建告警检查入口
- 归档 analyzer warning reduction 在 RP-042 至 RP-048 的晚期 active 文档细节
- 压缩 active todo 与 trace,只保留当前分支目标所需的恢复真值
2026-04-24 13:05:10 +08:00
gewuyou
bf37104c68 docs(zh-cn): 补齐首页与基础教程元数据
- 补充 zh-CN 首页与基础教程章节页的 frontmatter title 与 description
- 更新文档治理 topic 的恢复点、批次指标与下一步
2026-04-24 13:00:09 +08:00
gewuyou
a98d1cb8d0 docs(ai-plan): 更新告警批处理恢复点
- 更新 analyzer warning reduction 的 active todo 为 RP-048 当前真值
- 补充 plain dotnet build 成功与最新 origin/main baseline
- 记录当前批处理已到自然停点并收敛下一步建议
2026-04-24 12:59:03 +08:00
gewuyou
a8447a68a4
Merge pull request #282 from GeWuYou/docs/sdk-update-documentation
Docs/sdk update documentation
2026-04-24 12:53:39 +08:00
gewuyou
77e332fd44 fix(analyzer): 收口当前批次警告切片
- 修复 UnifiedSettingsFile 与 LocalizationMap 的集合暴露形状,减少可变集合泄漏风险
- 优化 CqrsHandlerRegistryGeneratorTests 的大型 fixture 组织方式,降低 MA0051 噪音
- 更新 analyzer warning reduction 的 active todo 与 trace,回写 0 warning solution 基线
2026-04-24 12:37:47 +08:00
gewuyou
091b872c86 docs(ai-plan): 更新告警基线追踪
- 更新 analyzer warning reduction 的 active tracking 到 RP-046 并记录 solution 级 891 条 warning 基线
- 补充前台构建与日志采集形态不一致的环境风险和后续恢复建议
2026-04-24 11:57:49 +08:00
gewuyou
5b9c879320 docs(pr-review): 收口文档评审遗留问题
- 更新 active tracking / trace 为当前恢复入口,并归档 RP-023 到 RP-025 的阶段细节
- 修复 zh-CN context 页面标题本地化与 troubleshooting 绝对链接后缀不一致问题
- 补充 PR #282 follow-up 的验证记录并确认 docs 站点构建通过
2026-04-24 11:44:22 +08:00
gewuyou
a0ce04b185 fix(godot): 收紧本地化映射集合暴露
- 修复 LocalizationMap 对可变 Dictionary 的直接公共暴露,降低 MA0016 集合暴露风险

- 新增复制输入映射的构造函数,并保留默认映射初始化行为以维持现有消费者兼容性

- 更新 XML 注释,明确只读访问语义和内部状态隔离原因
2026-04-24 10:46:17 +08:00
gewuyou
e692ed3e43
Merge pull request #280 from GeWuYou/fix/analyzer-warning-reduction-batch
Fix/analyzer warning reduction batch
2026-04-24 09:36:17 +08:00
gewuyou
982249151e docs(zh-cn): 补齐文档元数据缺口
- 补齐 docs/zh-CN 多个栏目页面的 title 与 description frontmatter,清空完全缺 frontmatter 的历史页面
- 修复 multiplayer、source-generators 与 troubleshooting 触达页面暴露的 Markdown 结构和站内链接问题
- 更新 documentation-full-coverage-governance 的恢复点、验证结果与下一批 metadata 热点
2026-04-24 09:19:36 +08:00
gewuyou
136b139312 fix(ai-plan): 修复PR评审涉及的归档跟踪文档问题
- 修复 analyzer warning reduction 归档 todo 中指向 RP-001 的相对链接

- 清理 rp002-rp041 trace 中误混入的 RP-001 历史段落

- 更新 active tracking 与 trace 的恢复点描述和验证结论
2026-04-24 08:41:31 +08:00
gewuyou
5b7c555472 docs(core): 补齐 Core 文档 frontmatter
- 补充 docs/zh-CN/core 目录 21 个专题页的 frontmatter 与 description

- 修复 core/ioc.md 的 ReaderWriterLockSlim 坏链和 core/state-management.md 的站内链接

- 更新 documentation-full-coverage-governance tracking 与 trace,记录本轮批处理指标、验证结果和停止点
2026-04-24 08:38:51 +08:00
gewuyou
66395739dc docs(governance): 收口公开文档治理口径
- 更新 AGENTS.md、DOCUMENTATION_STANDARDS.md 与 gframework-doc-refresh 规则,禁止在公开文档中暴露 inventory、覆盖基线与恢复点

- 修复 Core、Game、Ecs.Arch 与 abstractions 栏目中的 XML 覆盖表述,改为面向使用者的源码阅读入口

- 补充 contributor 页面 frontmatter,并统一 landing page、验证基线等内部术语为读者导向表达

- 更新 documentation-full-coverage-governance tracking 与 trace,记录 -batch-boot 75 基线、验证结果和下一步
2026-04-24 08:31:23 +08:00
gewuyou
833a95f7f3 fix(analyzer-warning-reduction): 收口PR280评审并压缩恢复入口
- 修复 SchemaConfigGeneratorTests 中冗余的 global:: 返回类型声明
- 归档 analyzer-warning-reduction 主题的 RP-002 至 RP-041 详细 tracking 与 trace 历史
- 更新 RP-042 的 active 跟踪与验证记录以反映 PR #280 follow-up 结论
2026-04-24 07:42:19 +08:00
gewuyou
2de57f5fde
Merge pull request #281 from GeWuYou/docs/sdk-update-documentation 2026-04-23 23:03:40 +08:00
GeWuYou
a3501c9b91 docs(skills): 更新 README 中关于文件变更停止条件的说明
- 移除了关于分支相对基线的旧说明
- 明确单个数字表示当前分支全部提交相对远程 origin/main 的文件变更数
- 详细说明两个数字表示文件数或变更行数的固定顺序
- 添加关于避免使用 | 符号的建议并说明其 OR 语义
2026-04-23 23:02:02 +08:00
dependabot[bot]
fdccfc4448 Bump Microsoft.Extensions.DependencyInjection.Abstractions from 10.0.6 to 10.0.7
---
updated-dependencies:
- dependency-name: Microsoft.Extensions.DependencyInjection.Abstractions
  dependency-version: 10.0.7
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-23 22:55:51 +08:00
dependabot[bot]
fa2488c108 Bump Microsoft.Extensions.DependencyInjection from 10.0.6 to 10.0.7
---
updated-dependencies:
- dependency-name: Microsoft.Extensions.DependencyInjection
  dependency-version: 10.0.7
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-23 22:55:34 +08:00
dependabot[bot]
06f8db2efd Bump Meziantou.Polyfill from 1.0.110 to 1.0.116
---
updated-dependencies:
- dependency-name: Meziantou.Polyfill
  dependency-version: 1.0.116
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-23 22:54:52 +08:00
dependabot[bot]
a7bd213044 Bump Meziantou.Analyzer from 3.0.48 to 3.0.52
---
updated-dependencies:
- dependency-name: Meziantou.Analyzer
  dependency-version: 3.0.52
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-23 22:54:36 +08:00
dependabot[bot]
c578910b40 build(deps): bump trufflesecurity/trufflehog from 3.94.3 to 3.95.2
Bumps [trufflesecurity/trufflehog](https://github.com/trufflesecurity/trufflehog) from 3.94.3 to 3.95.2.
- [Release notes](https://github.com/trufflesecurity/trufflehog/releases)
- [Commits](https://github.com/trufflesecurity/trufflehog/compare/v3.94.3...v3.95.2)

---
updated-dependencies:
- dependency-name: trufflesecurity/trufflehog
  dependency-version: 3.95.2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-23 22:54:07 +08:00
gewuyou
45b25f429f docs(documentation): 更新批处理恢复点指标
- 更新 documentation-full-coverage-governance 跟踪中的当前分支阈值状态
- 补充 trace 对 24 个文件与 264 行变更的 stop-condition 记录
- 说明剩余热点已转为正文语义性提及,适合后续逐页复核
2026-04-23 21:04:02 +08:00
gewuyou
8a117201d4 docs(documentation): 收口专题页README导航入口
- 更新专题页推荐阅读中的 README 入口为可点击 GitHub 链接
- 修复 source-generators 与 Game/ECS/CQRS 页面中的裸路径导航
- 更新 documentation-full-coverage-governance 跟踪与轨迹以记录第二批治理结果
2026-04-23 21:01:28 +08:00
gewuyou
a4bb041b0d docs(documentation): 补充文档站仓库入口链接
- 更新 docs/zh-CN landing page 与 API 导航页中的 README 入口为可点击 GitHub 链接
- 修复 VitePress 对 docs 外相对链接的 dead link 构建失败
- 更新 documentation-full-coverage-governance 跟踪与轨迹以记录本轮批处理结论
2026-04-23 20:53:41 +08:00
gewuyou
1a9e8f64bd refactor(sourcegenerators-tests): 收敛 Cqrs 隐藏泛型定义测试长方法
- 重构 HiddenGenericEnvelopeResponse 场景的共享 source fixture,清理当前 MA0051 位点

- 更新 analyzer-warning-reduction 的 tracking 与 trace,记录第五个有效 subagent 写集和基线降至 10 条
2026-04-23 20:38:58 +08:00
gewuyou
b1c8dccf9a refactor(sourcegenerators-tests): 收敛 Cqrs 隐藏数组响应测试长方法
- 重构 HiddenArrayResponseFallback 场景的共享 source fixture,清理当前 MA0051 位点

- 更新 analyzer-warning-reduction 的 tracking 与 trace,记录第四个有效 subagent 写集和基线降至 11 条
2026-04-23 20:30:46 +08:00
gewuyou
2da38a85a5 refactor(sourcegenerators-tests): 收敛 Cqrs 直接接口注册测试长方法
- 重构 HiddenImplementationDirectInterfaceRegistration 场景的共享 source fixture,清理当前 MA0051 位点

- 更新 analyzer-warning-reduction 的 tracking 与 trace,记录第三个有效 subagent 写集和基线降至 12 条
2026-04-23 20:21:18 +08:00
gewuyou
099a541475 refactor(sourcegenerators-tests): 收敛 Cqrs 隐藏处理器测试长方法
- 重构 HiddenNestedHandlerSelfRegistration 场景的共享 source fixture,清理当前 MA0051 位点

- 更新 analyzer-warning-reduction 的 tracking 与 trace,记录第二个有效 subagent 写集和基线降至 13 条
2026-04-23 20:12:58 +08:00
gewuyou
8975ef1a20 refactor(sourcegenerators-tests): 收敛 Cqrs 注册测试首个长方法
- 重构 CqrsHandlerRegistryGeneratorTests 首个程序集级注册场景的共享 fixture,清理当前 MA0051 位点

- 更新 analyzer-warning-reduction 的 tracking 与 trace,记录 subagent 循环首个有效写集和基线降至 14 条
2026-04-23 20:03:31 +08:00
gewuyou
148cfe14b0 docs(skills): 明确批处理阈值速记语义
- 更新 gframework-batch-boot skill,明确纯数字速记默认按当前分支相对远程 origin/main 的累计 diff 计算
- 补充文件数与代码行数双阈值的 OR 语义,并将无管道的 75 2000 作为推荐写法
- 同步更新 skills README 与 documentation governance tracking/trace,记录本轮规则收口与恢复点
2026-04-23 19:22:45 +08:00
gewuyou
2915624e60 refactor(sourcegenerators-tests): 收敛 SchemaConfigGeneratorTests 结构性警告
- 重构 SchemaConfigGeneratorTests 的共享 runtime fixture 与 generated-source helper,清理当前 MA0051 长方法

- 补充 project-level registration catalog 的专用契约断言,保持生成输出验证语义不变

- 更新 analyzer-warning-reduction 的 tracking 与 trace,记录基线降至 15 条并切换下一步恢复点
2026-04-23 19:15:13 +08:00
gewuyou
59fe63bba6 fix(docs): 修正文档中的泛型内联代码渲染
- 修复 Core 与函数式教程页面中的泛型 inline code 写法,避免 VitePress 将 HTML entity 按字面量展示
- 更新 documentation-full-coverage-governance 的 tracking 与 trace,记录本轮批处理基线、验证和恢复点
2026-04-23 18:06:52 +08:00
gewuyou
aa879d2c9a
Merge pull request #273 from GeWuYou/fix/analyzer-warning-reduction-batch
Fix/analyzer warning reduction batch
2026-04-23 17:51:41 +08:00
gewuyou
fdf7382717 fix(sourcegenerators): 收口PR审查遗留问题
- 修复 PR review 指出的 XML 文档位置、快照路径防御与换行归一化细节

- 更新 monster schema snapshot 场景,覆盖 dependentRequired、dependentSchemas、allOf 与 if/then/else 约束文档

- 补充 SchemaConfigGenerator 条件与组合校验 helper 的 XML 文档,并同步 ai-plan 恢复点与验证记录
2026-04-23 17:38:35 +08:00
gewuyou
efc0518996
Merge pull request #272 from GeWuYou/docs/sdk-update-documentation
Docs/sdk update documentation
2026-04-23 15:04:33 +08:00
gewuyou
2263cf296b fix(docs): 修正 Godot 文档泛型内联代码写法
- 修正 Godot setting 与 storage 文档中 inline code 使用 HTML entity 导致泛型按字面量渲染的问题

- 更新 documentation-full-coverage-governance 的 active tracking 与 trace,记录 PR #272 review follow-up 和 RP-019 恢复点
2026-04-23 13:40:39 +08:00
gewuyou
564b45bde1 feat(skills): 新增批量任务启动skill
- 新增 gframework-batch-boot skill,约束批量任务的 baseline 选择、stop condition 与循环委派流程

- 更新 skills README,补充批量任务 skill 的公开入口与调用示例
2026-04-23 13:34:47 +08:00
gewuyou
c3085f7c6a docs(godot): 修正 README 示例命名空间
- 修正 GFramework.Godot.SourceGenerators README 中错误的 SourceGenerators 特性命名空间示例
- 更新 documentation-full-coverage-governance 的 tracking 与 trace,记录 PR #272 的 Greptile follow-up 和验证结果
2026-04-23 13:24:03 +08:00
gewuyou
8cd492506d refactor(source-generators-tests): 收口 ContextGetGeneratorTests 的 MA0051
- 重构 ContextGetGeneratorTests 的长测试方法为场景常量与验证 helper,保持生成输入和断言语义不变

- 补充测试类与 helper 的 XML 文档,并统一生成源码与诊断断言的复用路径

- 验证 GFramework.SourceGenerators.Tests Release build 与 ContextGetGeneratorTests 过滤测试通过
2026-04-23 13:17:07 +08:00
gewuyou
18c595a72f refactor(source-generators-tests): 拆分 ContextRegistrationAnalyzerTests 结构
- 重构 ContextRegistrationAnalyzerTests 的场景源码常量,保持 analyzer 输入与 markup span 不变

- 补充测试方法与辅助 helper 文档,并统一诊断断言路径以收口 MA0051
2026-04-23 13:13:40 +08:00
gewuyou
a6b87c23e4 docs(governance): 收敛恢复入口并补充评审示例
- 更新 documentation governance 的 active tracking 与 trace,只保留当前恢复点、风险、验证结果与归档指针

- 归档 RP-001 到 RP-016 的状态与时间线摘要,降低 boot 恢复时的噪音

- 补充 UnifiedSettingsDataRepository 的统一文件布局示例,并补齐 Godot SourceGenerators 的生命周期接法代码片段
2026-04-23 13:11:42 +08:00
gewuyou
cebdbdbe9b refactor(source-generators-tests): 拆分 GeneratorSnapshotTest 快照流程
- 重构 RunAsync 的编译、诊断校验与快照断言阶段,收口 GeneratorSnapshotTest 的 MA0051

- 补充快照读取与缺失快照写入 helper 的 XML 文档,保持快照路径校验和失败语义不变
2026-04-23 13:11:25 +08:00
gewuyou
3203239726 fix(source-generators-tests): 收敛 schema 快照测试超长方法
- 重构 SchemaConfigGeneratorSnapshotTests 的 monster 场景输入与快照辅助逻辑,消除单个超长测试方法

- 更新 analyzer warning reduction 的 tracking 与 trace,记录 RP-033 基线和验证结果
2026-04-23 13:01:06 +08:00
gewuyou
4b5a760643 docs(game): 收口 Game 持久化文档波次
- 重写 Game 数据、存储、序列化与设置专题页,统一为当前运行时采用路径说明

- 补充 DataRepository、SaveRepository、FileStorage、JsonSerializer 与 SettingsModel 的职责边界和最小接入路径

- 更新 documentation-full-coverage-governance 的 RP-016 恢复点与验证结果
2026-04-23 11:54:58 +08:00
gewuyou
9d251ab1f8 refactor(source-generators-tests): 收敛自动注册模块测试告警
- 重构 AutoRegisterModuleGeneratorTests 的内联测试源码与快照常量,降低 MA0051 方法长度并保持生成断言不变
- 更新 analyzer warning reduction 的 tracking 与 trace,记录 RP-032 的验证结果和下一步恢复点
2026-04-23 11:48:14 +08:00
gewuyou
31ae1460a9 refactor(source-generators-tests): 收敛 Logger 快照测试告警
- 重构 LoggerGeneratorSnapshotTests 的重复场景源码构造,收口单文件 MA0051 告警
- 补充 LoggerGeneratorSnapshotTests 的 XML 文档并保持快照场景语义不变
- 更新 analyzer-warning-reduction 的 tracking 与 trace,记录 RP-031 验证结果和下一步恢复点
2026-04-23 11:37:49 +08:00
gewuyou
d0e86933cf fix(sourcegenerators-tests): 清理低风险 warning 基线
- 修复 GFramework.SourceGenerators.Tests 中低风险的 MA0004 与 MA0048,统一改为直接返回 Task 或在文件 I/O 上显式使用 ConfigureAwait(false)

- 更新 AnalyzerTestDriver 文件名与类型名对齐,避免测试基础设施继续产生文件命名 warning

- 更新 analyzer-warning-reduction 的 active tracking 与 trace,记录 RP-030 的 61 到 49 warnings-only 基线变化和验证结果
2026-04-23 11:22:59 +08:00
gewuyou
2fa19f89b6 docs(ai-plan): 更新文档治理恢复点
- 更新 documentation-full-coverage-governance tracking 到 RP-015 并记录 boot 后的 Godot 巡检结果

- 补充 trace 中的 validation-only 结论与最新验证记录
2026-04-23 11:06:21 +08:00
gewuyou
1a62f337a6 docs(godot): 刷新存储与设置专题页
- 更新 Godot 存储与设置专题页到当前运行时与 applicator 接线路径

- 补充 Godot 子页巡检结论、验证结果与 RP-014 恢复点记录
2026-04-23 10:45:29 +08:00
gewuyou
71f36c7c20 docs(ai-plan): 更新Godot文档巡检恢复点
- 更新 documentation-full-coverage-governance 的恢复点与 Godot 页面集合

- 记录 validation-only 巡检结论、定向校验结果与后续恢复方向
2026-04-23 10:38:12 +08:00
gewuyou
cdc6d7e028 docs(documentation): 更新Godot生成器入口描述
- 修正根 README 中 Godot.SourceGenerators 的模块职责摘要
- 补充 source-generators 总览页的 Godot 选包说明与 frontmatter
- 更新 documentation-full-coverage-governance 的恢复点与验证记录
2026-04-23 10:38:12 +08:00
gewuyou
9295480866 docs(godot): 刷新 Godot 文档入口
- 更新 GFramework.Godot README,使包定位、相邻包关系与最小接入路径与当前源码和测试一致
- 重写 GFramework.Godot.SourceGenerators README,补齐 project.godot、节点注入、行为包装与批量注册入口
- 补充 API 参考与 ai-plan 恢复点,确保 Godot 相关入口能直接落到专题页
2026-04-23 10:38:12 +08:00
gewuyou
7d6ff77ff4 docs(ai-plan): 回填Godot治理恢复摘要
- 更新 documentation-full-coverage-governance 的恢复点到 RP-010 并回填 Godot family 最小恢复摘要
- 补充 active topic 对 Godot 页面范围、generator owner、Scene/UI 边界与 archive 指针的记录
- 调整后续恢复步骤,改为继续巡检 cross-link 漂移而非重复评估 archive 迁回
2026-04-23 10:38:12 +08:00
gewuyou
5b7105d5be docs(ai-plan): 推进文档治理恢复点到 RP-009
- 更新 documentation-full-coverage-governance 的 active tracking,记录 closed PR 上陈旧 review thread 已本地核销
- 补充 RP-009 trace,将下一步切回 Godot inventory 与 cross-link 巡检 backlog
- 记录最新 PR review 抓取与 docs build 验证结果
2026-04-23 10:38:12 +08:00
gewuyou
dc8c5766dc refactor(analyzer-warning): 收口 SchemaConfigGenerator 剩余告警
- 拆分 SchemaConfigGenerator 的 schema 校验与代码发射 helper,清零 GFramework.Game.SourceGenerators 的剩余 MA0051
- 更新 analyzer-warning-reduction 的 tracking 与 trace,记录 RP-029 的验证结果与后续恢复点
2026-04-23 10:37:34 +08:00
gewuyou
9656393fbb
Merge pull request #269 from GeWuYou/fix/analyzer-warning-reduction-batch
Fix/analyzer warning reduction batch
2026-04-23 10:09:52 +08:00
gewuyou
b8c2ad42a9 fix(cqrs-source-generators): 化解注册生成器文件级冲突
- 合并 main 在线上单文件版本新增的模型 XML 文档,并迁移到当前 partial 拆分后的 Models 文件

- 保留 CqrsHandlerRegistryGenerator 主文件的现有生成管线拆分,不回退已完成的结构调整

- 更新 analyzer-warning-reduction 跟踪与 trace,记录本轮冲突确认、合并策略与构建验证结果
2026-04-23 09:58:35 +08:00
gewuyou
ba3a4d4a37 fix(core-source-generators): 修复ContextAware继承成员命名冲突
- 修复 ContextAwareGenerator 的保留名收集逻辑,使 _gFrameworkContextAware* 字段分配覆盖完整基类链

- 新增 inherited collision 快照回归测试与快照文件,锁定基类占用字段名时的后缀回退行为

- 更新 analyzer-warning-reduction 跟踪与 trace,记录本轮 Greptile follow-up 与验证结果
2026-04-23 09:58:34 +08:00
gewuyou
2fc8442bd4 fix(source-generators-tests): 修复PR269引用元数据唯一性回归测试
- 修正 SchemaConfigGeneratorTests 的 reference metadata 唯一性用例,改用合法 schema 路径碰撞覆盖后缀分配逻辑

- 更新 analyzer-warning-reduction 跟踪与 trace,记录 PR #269 failed-test follow-up 和定向验证结果
2026-04-23 09:58:34 +08:00
gewuyou
050f4321c6 fix(source-generators): 收口PR269剩余review与构建规范
- 修复 SchemaConfigGenerator 的归一化字段名冲突诊断,并补充对应 generator 回归测试

- 修复 CqrsHandlerRegistryGenerator 对 dynamic 的运行时类型引用,避免生成非法 typeof(dynamic)

- 更新 AGENTS 与 analyzer-warning-reduction 跟踪,明确受影响模块必须独立 build 并处理或显式报告 warning
2026-04-23 09:58:33 +08:00
GeWuYou
4ef9406ee9 fix(source-generators): 收口PR269剩余review问题
- 修复 Cqrs handler registry 对 Roslyn error type 的直接引用,改走安全的运行时类型查找

- 补充 SchemaConfigGenerator 根 type 非字符串诊断回归与 Cqrs 未解析类型回归测试

- 更新 analyzer-warning-reduction 的 RP-024 跟踪与验证记录
2026-04-23 09:58:33 +08:00
GeWuYou
df68cdfd82 fix(pr269): 收口剩余评审修复
- 修复 SchemaConfigGenerator 的根类型标识符校验与 comparer XML 文档转义\n- 补强 LoggingConfiguration 与 CollectionExtensions 的公共 API 兼容断言\n- 重构 Cqrs 运行时类型反射查找 helper,并更新 analyzer-warning-reduction 跟踪与验证记录
2026-04-23 09:58:32 +08:00
GeWuYou
12f15961af fix(pr269): 收口评审兼容性与生成器修复
- 恢复 EasyEvents、CollectionExtensions 与 logging 配置模型的公共 API 兼容形状

- 修复 ContextAwareGenerator 字段命名冲突、锁内读取路径与相关快照回归测试

- 更新 Cqrs 与 schema generator 的 null/cancellation 契约,并同步 ai-plan 跟踪与验证记录
2026-04-23 09:58:32 +08:00
gewuyou
6d4f9f2f94 fix(source-generators): 收口PR269生成器评审修复
- 重构 CqrsHandlerRegistryGenerator 为按职责拆分的 partial 生成器文件,保留现有注册输出与 fallback 契约
- 修复 ContextAwareGenerator 生成字段命名冲突并为 SetContextProvider 补充运行时 null 校验与异常文档
- 补充 Option<T> 的 XML remarks 契约说明与 ContextAwareGenerator 字段冲突快照测试
- 更新 analyzer-warning-reduction 跟踪与 trace,记录 PR #269 review follow-up 与验证结果
2026-04-23 09:58:30 +08:00
GeWuYou
0f8bf077e4 refactor(source-generators): 拆分配置生成器警告热点
- 重构 SchemaConfigGenerator 的 schema 解析、属性解析与遍历阶段

- 拆分数组属性、约束文档和生成代码发射 helper 以降低 MA0051 基线

- 更新 analyzer warning reduction 恢复文档和验证记录
2026-04-23 09:56:08 +08:00
gewuyou
78a23bf53a fix(game-source-generators): 清理 SchemaConfigGenerator 字符串比较
- 修复 SchemaConfigGenerator 中 schema 关键字比较缺少 StringComparison 的 analyzer warning

- 新增 schema 类型比较 helper 以统一 ordinal 比较语义

- 更新 analyzer warning reduction 的 RP-019 恢复记录与验证结果
2026-04-23 09:56:07 +08:00
gewuyou
de782ae179 refactor(cqrs): 拆分处理器注册生成器
- 重构 CQRS handler registry 生成器的候选分析、运行时类型引用和源码发射阶段

- 补充 analyzer warning reduction 的 RP-018 跟踪和验证记录
2026-04-23 09:56:06 +08:00
gewuyou
7ec2185ae0 refactor(source-generators): 拆分上下文感知生成逻辑
- 重构 ContextAwareGenerator 的上下文属性生成流程,降低 MA0051 复杂度
- 补充 analyzer warning reduction 的 RP-017 恢复记录与验证结果
- 更新 下一步 MA0158 多目标兼容性评估方向
2026-04-23 09:49:21 +08:00
GeWuYou
97573be2e1 fix(core): 清零低风险分析器警告
- 更新 Core 配置与集合扩展的集合抽象契约

- 修复 CoroutineScheduler 字符串字典 comparer 与 EasyEvents 重复注册异常类型

- 补充 Option<T> 相等性接口并更新 analyzer recovery 记录
2026-04-23 09:49:21 +08:00
gewuyou
3f95843d59
Merge pull request #271 from GeWuYou/docs/sdk-update-documentation
Docs/sdk update documentation
2026-04-23 09:22:23 +08:00
gewuyou
df91d3706b fix(docs): 修复 PR 评审遗留与 Git 抓取
- 修复 gframework-pr-review 在 WSL worktree 中优先使用显式 Linux Git 绑定

- 更新 CQRS 与 ECS 文档以及 skill 文案,消化 PR #271 中仍成立的 review 意见

- 归档 documentation-full-coverage-governance 历史验证记录,并补写 trace 验证结果态
2026-04-23 08:49:41 +08:00
gewuyou
737dd5d91d docs(ai-plan): 更新文档治理恢复点
- 更新 documentation-full-coverage-governance 恢复点到 RP-007
- 记录 Game family 巡检通过且未发现回漂
- 补充 docs build 验证结果与后续恢复建议
2026-04-23 07:41:54 +08:00
gewuyou
819f91a7ad docs(governance): 更新 WSL Git 回退优先级
- 更新 AGENTS.md,优先使用显式 --git-dir 与 --work-tree 绑定操作 worktree Git

- 补充 git.exe 在当前会话不可执行时的 fallback 规则,避免重复命中 Exec format error

- 更新 documentation-full-coverage-governance 的 tracking 与 trace,记录已验证的 Git 使用方式
2026-04-23 07:36:32 +08:00
gewuyou
007c33f772 docs(game): 刷新 Game 模块文档基线
- 更新 Game family README、landing 与 abstractions 页面,补齐声明级 XML inventory 入口

- 修复 Game.Abstractions 页面与当前源码不一致的旧接口摘录,改写为真实契约边界与最小接入路径

- 补充 ai-plan 跟踪与 trace,推进恢复点到 RP-005 并记录验证结果
2026-04-23 07:30:03 +08:00
gewuyou
a1dbed3c8d docs(cqrs): 刷新 Cqrs 文档入口
- 更新 Cqrs family landing、API 参考与 source-generators 导航

- 新增 CQRS handler registry 专题页并补充 XML inventory

- 补充 runtime 与 generator 内部类型 XML 注释

- 记录 RP-004 验证结果与后续恢复点
2026-04-22 18:51:05 +08:00
GeWuYou
da0ae700a3 docs(ecs): 重写 Ecs.Arch 文档入口
- 重写 Ecs.Arch README 与 ecs 栏目页面,使采用路径对齐当前源码和集成测试

- 补充 Ecs.Arch.Abstractions 的 XML inventory 与抽象页阅读链路

- 更新 documentation-full-coverage-governance 的恢复点、验证结果和下一波次计划
2026-04-22 17:19:33 +08:00
GeWuYou
af21f16c09 docs(core): 补齐 Core XML 覆盖基线清单
- 补充 Core 与 Core.Abstractions README 的类型族级 XML 覆盖基线入口

- 更新 Core 与 Core.Abstractions landing page 的 XML inventory、代表类型和阅读重点

- 同步刷新 documentation-full-coverage-governance 的 tracking 与 trace 恢复点
2026-04-22 16:06:44 +08:00
gewuyou
704fdaa2c8 docs(core): 对齐 Core 模块文档入口
- 更新 Core 与 Core.Abstractions README 的目录映射和 XML 阅读入口

- 重写 Core Abstractions 页面,改为契约边界与最小接入路径说明

- 补充 Core landing page、API 参考入口和 ai-plan 跟踪记录
2026-04-22 15:32:22 +08:00
GeWuYou
cc49b8638f docs(governance): 建立长期文档治理入口
- 新增 documentation-full-coverage-governance active topic 与首轮 inventory、trace 入口
- 补充 GFramework.Ecs.Arch.Abstractions README、抽象接口页面与导航映射
- 更新 API 参考页与根 README,明确内部支撑模块 owner 和阅读链路
2026-04-22 15:07:15 +08:00
gewuyou
45a87c6988 docs(ai-plan): 归档文档治理主题
- 迁移 documentation-governance-and-refresh 主题到 public archive 目录

- 更新 public README 的 active topic 与 worktree 映射

- 收口归档内 tracking 和 trace 的完成状态与恢复说明
2026-04-22 14:31:29 +08:00
gewuyou
310aeafa57 docs(ai-plan): 收口文档治理恢复入口
- 归档 documentation-governance-and-refresh 截至 2026-04-22 的跟踪与 trace 历史

- 更新 active tracking 与 trace,只保留恢复点、风险、验证结果和下一步

- 补充 Godot 栏目稳定性复核后的归档决策与 PR #268 follow-up 入口
2026-04-22 14:23:15 +08:00
gewuyou
b2a5555c75
Merge pull request #270 from GeWuYou/docs/sdk-update-documentation
Docs/sdk update documentation
2026-04-22 14:14:54 +08:00
GeWuYou
76e7f68544 docs(godot): 收口日志系统文档
- 重写 docs/zh-CN/godot/logging.md,按当前 provider、控制台输出语义与 [Log] 边界整理采用路径

- 更新 documentation-governance-and-refresh 的 tracking 与 trace,推进恢复点到 RP-017 并记录验证结果
2026-04-22 13:33:35 +08:00
GeWuYou
3ba1e3f202 docs(godot): 收口 signal 与 extensions 文档
- 更新 godot signal 页面,明确 Signal(...)、SignalBuilder 与 [BindNodeSignal] 的分工

- 更新 godot extensions 页面,收敛到当前存在的扩展成员与生命周期边界

- 补充 documentation-governance-and-refresh 跟踪与 trace,记录 RP-016 和验证结果
2026-04-22 13:20:18 +08:00
gewuyou
03ecbe5989 docs(godot): 重写场景与UI接入文档
- 更新 Godot 场景文档,按当前 factory、registry、root、provider 与 AutoScene 接线收口采用路径
- 更新 Godot UI 文档,明确 layer 语义、provider 要求、root 接线与 AutoUiPage 用法
- 同步 documentation-governance-and-refresh 跟踪与 trace 到 RP-015,并把下一步切到 signal/extensions
2026-04-22 13:03:14 +08:00
gewuyou
5d436694f8 docs(godot): 收口 Godot 入口与架构文档
- 更新 Godot landing page,使包关系、最小接入路径与运行时边界回到源码与测试契约

- 重写 Godot architecture 页面,明确锚点生命周期、模块挂接顺序与 IGodotModule 契约边界

- 更新 documentation-governance topic 的 RP-014 跟踪与验证记录,标记下一轮收口目标
2026-04-22 12:50:05 +08:00
GeWuYou
a77f79b3e2 docs(tutorials): 重写 Godot 集成教程
- 重写 Godot 集成教程,按当前源码与 CoreGrid 采用路径收口 project.godot、GetNode 与 BindNodeSignal 的接线说明

- 更新 tutorials 入口摘要与 documentation-governance-and-refresh 跟踪,记录 RP-013、验证结果和下一恢复点
2026-04-22 12:33:53 +08:00
gewuyou
aec1931c74 docs(source-generators): 收口 AutoRegister 文档语义
- 更新 auto-register-exported-collections 专题页,补齐 frontmatter 并按当前源码与测试收口成员形状、匹配规则、null-skip 行为与诊断边界

- 补充 documentation-governance-and-refresh 的 RP-012 恢复点,记录 godot-integration tutorial 仍残留旧 API 的跟进风险
2026-04-22 11:39:35 +08:00
gewuyou
214f52b6c2 docs(source-generators): 刷新 Godot 生成器文档
- 更新 Godot 项目元数据、GetNode 与 BindNodeSignal 专题页,按当前源码与测试收口最小接入路径、生成语义与诊断边界

- 补充 documentation-governance-and-refresh 的 RP-011 恢复点、验证结果与下一步建议
2026-04-22 11:25:49 +08:00
gewuyou
3425b299f0
Merge pull request #268 from GeWuYou/docs/sdk-update-documentation
docs(game): 收口场景与UI专题文档
2026-04-22 11:15:34 +08:00
GeWuYou
fe4fd1aa5e fix(pr-review): 补齐多AI评审覆盖并收口文档层级
- 新增 gframework-pr-review 对 greptile-apps 的 reviewer 摘要、thread 计数与 skill 描述

- 修复 fetch_current_pr_review.py 的 reviewer 聚合输出与函数 docstring 覆盖

- 修复 Scene/UI 文档的最小接入路径标题层级问题

- 修复 validate-code-blocks.sh 的 code fence 判断与 module-config 的 README 映射
2026-04-22 11:05:27 +08:00
gewuyou
ce6bab2301 docs(review): 收口PR反馈与技能描述
- 修复 gframework-doc-refresh skill 描述中的 YAML 解析问题

- 补充 Game Scene 与 UI 接入目录和文件约定

- 归档文档治理已闭环 trace 并更新当前恢复点
2026-04-22 09:57:58 +08:00
gewuyou
1239fb4651 refactor(skills): 统一文档刷新技能入口
- 新增 gframework-doc-refresh 统一技能入口,并补齐模块扫描、证据顺序、模板与校验脚本

- 更新共享文档规范与模块映射,收口源码模块到 README、docs 和 ai-libs 的固定关联

- 删除旧 vitepress-* 公开技能定义,避免继续以文档类型拆分入口

- 同步 documentation-governance-and-refresh 的恢复点、风险和下一步
2026-04-22 09:13:22 +08:00
gewuyou
a980a042ae
Merge pull request #267 from GeWuYou/fix/analyzer-warning-reduction-batch
fix(core): 统一事件签名并清理MA0046告警
2026-04-21 18:21:38 +08:00
GeWuYou
a9f86348ff fix(core): 修复 AsyncLogAppender 刷新竞态
- 修复 AsyncLogAppender 在队列已被后台线程提前清空时 Flush 仍可能超时失败的问题
- 新增 AsyncLogAppender 已处理队列场景的稳定回归测试并重新验证 GFramework.Core.Tests
- 更新 analyzer-warning-reduction 的 tracking 与 trace 记录 PR267 failed-test follow-up
2026-04-21 17:32:50 +08:00
GeWuYou
685897f2de fix(core): 收口 PR267 事件契约遗留问题
- 修复 AsyncLogAppender 接口刷新路径重复触发完成事件,并补充单次通知回归测试
- 补充 Architecture、CoroutineExceptionEventArgs 与阶段协调器的事件契约注释
- 更新 PhaseChanged 迁移文档与 analyzer-warning-reduction recovery 记录
2026-04-21 16:50:56 +08:00
GeWuYou
d836ec8027 docs(agents): 修复提交正文换行约束
- 补充 Git 提交规则,禁止使用 Bash $"..." 传递多行 commit body

- 规定多行正文应改用多个 -m 或 ANSI-C $... 引号,避免字面量 \n 被写入提交信息

- 验证 docs 站点构建通过
2026-04-21 16:46:25 +08:00
GeWuYou
48e45787f3 docs(source-generators): 收口上下文与优先级生成器文档
- 重写 ContextAware 与 Priority 专题页,按当前生成成员、priority-aware API 和兼容边界说明使用方式\n- 更新 documentation-governance-and-refresh 的 tracking 与 trace,记录 RP-007 与后续 Godot 生成器核对重点\n- 验证 docs 站点构建通过
2026-04-21 16:26:13 +08:00
GeWuYou
8831cb42a8 fix(core): 统一事件签名并清理MA0046告警
hBc
2026-04-21 16:15:36 +08:00
GeWuYou
da707c7b4f docs(game): 收口场景与UI专题文档
- 重写 game/scene 与 game/ui 专题页,按当前 router、factory、root、输入与暂停语义说明接入方式\n- 更新 documentation-governance-and-refresh 的 tracking 与 trace,记录 RP-006 与后续 source-generators 核对重点\n- 验证 docs 站点构建通过
2026-04-21 16:08:05 +08:00
gewuyou
9ccfed3ad9
Merge pull request #265 from GeWuYou/fix/analyzer-warning-reduction-batch
Fix/analyzer warning reduction batch
2026-04-21 15:08:56 +08:00
gewuyou
4d306498b9
Merge pull request #266 from GeWuYou/docs/sdk-update-documentation
docs(core): 收口 Core 事件属性与日志专题页
2026-04-21 14:09:11 +08:00
GeWuYou
4a779ac794 fix(tooling): 优化 PR review 输出收窄流程
- 新增 gframework-pr-review 脚本的 JSON 落盘、section 过滤与 path 过滤能力
- 更新文本输出截断与 skill 用法说明以减少超长 review JSON 漏看风险
- 更新 analyzer-warning-reduction 的 tracking 与 trace 以记录 RP-012 验证结果
2026-04-21 14:04:12 +08:00
GeWuYou
a5a35ce6ed docs(core): 收口 Core 事件属性与日志专题页
- 更新 Core events、property 与 logging 专题页,改回当前公开入口、边界与迁移建议
- 记录 state-management 与 coroutine 的复核结论,明确本轮无需继续机械改写
- 推进 documentation-governance-and-refresh 到 RP-005,并更新下一恢复点到 game 与 source-generators 栏目
2026-04-21 13:07:38 +08:00
GeWuYou
240fc761ed fix(events): 修复事件监听器计数偏差
- 修复 Event 泛型事件默认 no-op 委托导致的 GetListenerCount off-by-one
- 补充 Event 单参数与双参数监听器计数回归测试
- 更新 analyzer-warning-reduction 的 tracking 与 trace 以记录 RP-011 验证结果
2026-04-21 13:01:05 +08:00
GeWuYou
aa78dfbf51 fix(core): 修复 PR review 回归问题
- 修复 CoroutineScheduler 在零初始容量下的扩容边界并补充回归测试
- 修复 Store dispatch 快照阶段的异常回滚逻辑并补充异常安全测试
- 更新 analyzer-warning-reduction 的 tracking 与 trace 以记录 RP-010 验证结果
2026-04-21 12:56:28 +08:00
gewuyou
c61ee140a1
Merge branch 'main' into fix/analyzer-warning-reduction-batch 2026-04-21 12:44:28 +08:00
gewuyou
2c678cbdda
Merge pull request #264 from GeWuYou/docs/sdk-update-documentation
docs: Realign Core/Game documentation with current APIs and ai-libs reference implementations
2026-04-21 12:44:01 +08:00
GeWuYou
233195df91 docs(core): 补齐导航链接并收口追踪告警
- 更新 core landing page 的 Godot 与 Source Generators 导航入口为可点击链接
- 修复 documentation-governance-and-refresh active trace 的重复标题并消除 MD024 告警
- 补充 tracking 与 trace 的恢复点、验证记录和 PR review 跟进结论
2026-04-21 12:34:37 +08:00
GeWuYou
33c435bad5 refactor(core): 收拢泛型家族文件以清理MA0048
- 重构 Command 与 Query 抽象基类文件布局,合并同名泛型家族到基名文件
- 迁移泛型 Event 类型到 Event.cs,保持公共 API 与行为不变
- 更新 analyzer warning reduction 的 RP-009 跟踪与验证结果
2026-04-21 12:31:24 +08:00
GeWuYou
26d5d84d26 fix(pr-review): 修复 CodeRabbit 非空评审解析
- 修复最新 head commit 上空 APPROVED review 覆盖非空 COMMENTED review 的选择逻辑
- 保持最新 review 元数据输出不变,并新增用于结构化解析的非空 CodeRabbit review 选择
- 验证当前分支 PR 可重新提取 Nitpick comments
2026-04-21 12:30:53 +08:00
GeWuYou
035c7db18e docs(ai-plan): 更新 warning 批处理策略
- 更新 analyzer warning reduction 的恢复策略,明确按类型优先批处理
- 补充单次 boot 的文件改动上限与非冲突 subagent 并行规则
- 修正文档措辞,明确低数量时可顺手吸收其他低冲突类型而非特指 MA0015 和 MA0077
2026-04-21 11:40:32 +08:00
GeWuYou
f044aeb770 fix(analyzer): 收敛 CoroutineScheduler 长方法 warning
- 重构 CoroutineScheduler 的启动与完成清理阶段,降低 MA0051 并保持取消与完成语义
- 补充辅助方法注释,保留标签分组、统计和等待者唤醒顺序
- 更新 analyzer warning reduction 的恢复点与验证记录
2026-04-21 11:17:47 +08:00
GeWuYou
ec0c9a7bc8 fix(analyzer): 收敛 Store 长方法 warning
- 重构 Store 的 dispatch 进入提交退出阶段,降低 MA0051 并保持锁与通知语义
- 重构 reducer 快照创建流程,保留多态匹配的稳定排序规则
- 更新 analyzer warning reduction 的恢复点与验证记录
2026-04-21 10:30:20 +08:00
gewuyou
b553d7cbc6
Merge pull request #263 from GeWuYou/fix/analyzer-warning-reduction-batch
Fix/analyzer warning reduction batch
2026-04-21 09:31:32 +08:00
GeWuYou
ff1996e81b refactor(pause): 收口 PauseStackManager 长方法告警
- 重构 PauseStackManager 的销毁与 Pop 流程,拆分锁内状态迁移与锁外通知阶段
- 新增 PauseStackManager 销毁恢复通知回归测试,覆盖多暂停组销毁补发行为
- 更新 analyzer warning reduction 主题的 active tracking 与 trace,记录 RP-005 验证结果和下一恢复点
2026-04-21 09:18:20 +08:00
GeWuYou
60faf8eaff docs(core): 重写核心专题页文档
- 更新 architecture、context、lifecycle、command、query 与 cqrs 页面,使其对齐当前公开 API 与初始化语义
- 移除 Init、属性式总线、旧输入赋值示例和已移除的 Mediator 兼容入口等过时说明
- 补充 documentation-governance-and-refresh 主题的恢复点、验证结果与下一步专题页计划
2026-04-21 09:14:06 +08:00
GeWuYou
358b1e9cca fix(cqrs): 修复 PR 审查遗留问题
- 修复 CqrsHandlerRegistrar generated registry 激活路径的可空 out 契约并移除 null! 抑制
- 更新 analyzer warning reduction 跟踪与 trace,记录 PR #263 review follow-up 和编译验证结果
2026-04-21 08:42:13 +08:00
GeWuYou
dfeb40ba15 docs(documentation): 更新 ai-libs 参考引用
- 更新 AGENTS、Game README 与游戏栏目入口中的参考表述,统一改为 ai-libs 下的只读参考实现
- 移除活跃文档入口中的旧外部项目命名,避免继续暴露特定参考仓库线索
- 补充 documentation-governance-and-refresh 主题的 tracking 与 trace,记录本轮引用迁移和后续约束
2026-04-21 08:27:14 +08:00
GeWuYou
462a71ba3c fix(core): 拆分架构生命周期初始化流程
- 优化 ArchitectureLifecycle 的初始化批次与阶段执行拆分

- 保持阶段顺序、日志语义与 late registration 行为不变

- 更新 analyzer warning reduction 的 active tracking 与 trace,记录 RP-003 验证结果
2026-04-21 08:27:11 +08:00
GeWuYou
5c7870ca3e fix(cqrs): 拆分处理器注册长方法
- 优化 CqrsHandlerRegistrar 的 generated registry 激活与 fallback 解析拆分

- 保持原有日志文本、缓存策略与 reflection fallback 语义不变

- 更新 analyzer warning reduction 的 active tracking 与 trace,记录 RP-002 验证结果
2026-04-21 07:46:00 +08:00
GeWuYou
7531762d3e docs(documentation): 收口栏目入口页导航
- 更新 Core、Game 与 Source Generators 栏目 landing page,使其对齐当前模块定位、包关系与最小接入路径
- 修复 VitePress 对 docs 目录外 README 相对链接的 dead-link 校验问题,改为纯文本入口提示
- 补充 documentation-governance-and-refresh 主题的恢复点、验证结果与下一步专题页修订计划
2026-04-21 07:45:39 +08:00
gewuyou
5175f00178
Merge pull request #261 from GeWuYou/feat/cqrs-optimization
Feat/cqrs optimization
2026-04-20 20:00:13 +08:00
GeWuYou
13d52a8a94 docs(cqrs-rewrite): 同步PR评审追踪状态
- 更新 cqrs-rewrite migration trace,标记 RP-047 已被 RP-050 覆盖并禁止恢复 MakePointerType precise registration
- 同步 migration tracking 中 PR #261 的 open thread、CTRF 测试结果与 MegaLinter 状态
2026-04-20 19:48:31 +08:00
GeWuYou
c1f9fa8b9a fix(cqrs): 修复指针合同生成回归
- 修复 CqrsHandlerRegistryGenerator 对 pointer 与 function pointer 的精确注册建模
- 补充生成器测试对输入源 CS0306 与 fallback 诊断的断言
- 更新 cqrs-rewrite 跟踪文档记录 PR #261 review follow-up
2026-04-20 19:42:06 +08:00
gewuyou
db65249315 refactor(cqrs): 收敛处理器重复映射判定
- 优化 CqrsHandlerRegistrar 使用本地映射索引替代重复线性扫描
- 补充 重复 handler 类型输入仍只注册一份映射的回归测试
- 更新 cqrs-rewrite 跟踪与 trace 到 RP-049
2026-04-20 19:42:06 +08:00
gewuyou
110666d06b refactor(cqrs): 缓存处理器接口反射元数据
- 优化 CqrsHandlerRegistrar 复用 supported handler interface 缓存
- 补充 registrar 静态缓存隔离与接口缓存复用回归测试
- 更新 cqrs-rewrite 跟踪与 trace 到 RP-048
2026-04-20 19:42:06 +08:00
gewuyou
5f3964d4c0 refactor(cqrs): 扩展指针类型注册生成覆盖
- 优化 CqrsHandlerRegistryGenerator 对 pointer 类型的 runtime type 递归重建与发射逻辑
- 修复 function pointer 签名默认直出导致隐藏类型漏回退的判定边界
- 补充 pointer precise registration 与 function pointer fallback 回归测试
- 更新 cqrs-rewrite 跟踪与 trace 到 RP-047
2026-04-20 19:42:06 +08:00
gewuyou
7cf0a75568 refactor(cqrs): 收敛生成注册器激活反射路径
- 优化 generated registry 激活流程,使用缓存工厂委托优先替代 ConstructorInfo.Invoke\n- 补充私有无参构造 registry 的回归测试,保持生成器产物兼容性\n- 更新 CQRS ai-plan 恢复点与验证记录,指向新的 Phase 8 下一步
2026-04-20 19:42:06 +08:00
gewuyou
a926748def docs(ai-plan): 同步CQRS恢复点复核结果
- 更新 CQRS 重写跟踪中的恢复点与活跃事实,记录 PR #253 已关闭且剩余 thread 为 stale review\n- 调整 CQRS 重写 trace 的下一步,恢复 Phase 8 主线优先级
2026-04-20 19:42:06 +08:00
gewuyou
3fabf44387
Merge pull request #262 from GeWuYou/feat/ai-first-config
feat(config): 支持对象约束型条件 schema
2026-04-20 19:41:17 +08:00
GeWuYou
ed53f9c68c fix(ai-first-config): 收口PR评审解析与Tooling校验
- 修复 gframework-pr-review 对 outside-diff 评论与 Python nitpick 卡片的解析,并补充结构化输出
- 优化 review section 解析边界,避免 latest review body 区块串读并消化 marker 查找 nitpick
- 收紧 config tool 对条件分支 schema 坏形状的拒绝规则,并新增 JS 回归测试
- 更新 ai-plan 跟踪与 trace,记录本轮 PR #262 follow-up 验证结果
2026-04-20 19:20:47 +08:00
GeWuYou
5f2442dbcd fix(ai-first-config): 收口条件分支评审跟进
- 修复 Runtime 条件分支 schema 坏形状的诊断路径,改为指向具体 if/then/else 分支
- 新增 else 缺失 if 的运行时回归测试,保持与 Generator 覆盖对称
- 更新 ai-plan 跟踪与 trace,记录 PR #262 follow-up 验证并消除重复标题
2026-04-20 18:07:23 +08:00
GeWuYou
8a39f0a932 fix(ai-first-config): 修复 PR review nitpick 解析与跟进收口
- 修复 gframework-pr-review 对 latest review body folded nitpick comments 的解析遗漏,并输出 declared / parsed 数量
- 优化 config tool 的条件提示与共享校验 helper
- 补充 generator/runtime/tooling 回归测试并更新 ai-plan 跟踪
2026-04-20 17:02:08 +08:00
GeWuYou
0da15f6ffd fix(config): 修复条件分支诊断与文档摘要
- 修复 then/else 非 object 分支诊断定位到具体条件路径
- 优化 if/then/else 文档摘要,补充 properties 内约束说明
- 补充生成器回归测试,覆盖分支路径与文档输出
2026-04-20 17:02:08 +08:00
GeWuYou
68d653623a feat(config): 支持对象约束型条件 schema
- 新增 Runtime、Source Generator 与 VS Code Tooling 对 object-focused if/then/else 的一致支持
- 补充运行时、生成器与工具链回归测试覆盖
- 更新配置系统文档与 ai-plan 恢复入口
2026-04-20 17:02:08 +08:00
gewuyou
f99736f95f
Merge pull request #260 from GeWuYou/feat/data-repository-persistence
Refactor migration chain execution with unified VersionedMigrationRunner
2026-04-20 15:55:31 +08:00
GeWuYou
5353d5bd45 fix(game): 修复设置迁移缓存并发一致性
- 修复 SettingsModel 迁移注册与缓存重建的并发竞争

- 新增 SettingsModel 并发回归测试并更新 ai-plan 跟踪
2026-04-20 13:02:49 +08:00
GeWuYou
a0cc418e05 docs(ai-plan): 修正 PR 评审后的恢复文档状态
- 更新 tracking 文档中的 PR #260 review follow-up 状态描述

- 修复 trace 文档重复的三级标题,避免 Markdown 锚点冲突
2026-04-20 12:46:08 +08:00
gewuyou
702dec6ed1
Merge pull request #259 from GeWuYou/feat/coroutine-optimization
test(coroutine): 补齐 Godot 协程宿主回归测试
2026-04-20 11:49:57 +08:00
GeWuYou
ec3de5bbb0 fix(game): 修复 PR 评审遗留的迁移与文档问题
- 修复 SaveRepository 迁移链并发读取,改为单次快照执行

- 补充 VersionedMigrationRunner 与 SettingsModel 的 XML 文档契约

- 更新 PersistenceTests、接入文档与 ai-plan 跟踪记录
2026-04-20 11:44:27 +08:00
GeWuYou
90b9e2a4c9 fix(ci): 修复 MegaLinter 工作区歧义
- 修复 MegaLinter 的 dotnet format workspace 指向,避免 solution 与 csproj 歧义导致 CI warning
- 更新 gframework-pr-review skill 与抓取脚本,提取 GitHub Actions 发布的 MegaLinter detailed issues
- 补充 coroutine optimization 跟踪与 trace,记录本次 PR 页面 warning 的收口与验证结果
2026-04-20 11:20:14 +08:00
GeWuYou
d369118351 fix(coroutine): 收口 Timing 测试宿主清理
- 修复 Timing 共享单例仅在当前实例持有引用时才清理,避免测试宿主误伤其他实例
- 新增 TimingTests 的 NonParallelizable 约束,避免静态实例槽位并发污染
- 更新 coroutine optimization 跟踪与 trace,记录 PR #259 review 收口与验证结果
2026-04-20 10:19:11 +08:00
gewuyou
88de1235ae refactor(game): 收敛版本迁移链执行器
- 新增 internal 迁移执行器,统一 settings 与 save 的链式版本校验

- 修复 SettingsModel 重复注册、缺链回填与目标版本判定的迁移约束

- 补充 Persistence 与 SettingsModel 定向测试,并更新迁移文档和 ai-plan 跟踪
2026-04-20 09:52:37 +08:00
gewuyou
9576e0f8bd test(coroutine): 补齐 Godot 协程宿主回归测试
- 新增 Timing 纯托管测试宿主入口,支持在 dotnet test 下验证 Godot 协程阶段推进
- 补充 TimingTests,覆盖暂停、segment 路由和阶段等待回归
- 更新 coroutine ai-plan 跟踪与 trace,记录 RP-002 验证结果与后续缺口
2026-04-20 09:40:46 +08:00
gewuyou
31ca8cc963 docs(game): 澄清 JsonSerializer 配置与并发契约
- 补充 JsonSerializer 对 settings 与 converters 生命周期的 XML 注释

- 更新序列化文档与 README,修正线程安全和组合根配置说明

- 新增 JsonSerializer 配置实例暴露契约测试,并回写 data-repository-persistence 跟踪
2026-04-20 09:36:11 +08:00
gewuyou
374db438ea
Merge pull request #258 from GeWuYou/feat/data-repository-persistence
docs(ai-plan): 迁移数据仓库持久化计划
2026-04-19 22:58:15 +08:00
GeWuYou
254d354c8d docs(ai-plan): 迁移数据仓库持久化计划
hBc
2026-04-19 22:30:26 +08:00
gewuyou
58f325317e
Merge pull request #257 from GeWuYou/feat/coroutine-optimization
docs(ai-plan): 迁移 coroutine 早期计划
2026-04-19 21:59:12 +08:00
GeWuYou
2381e72572 docs(sdk): 更新 SDK 文档并移除已归档的协程优化分支信息
- 移除了关于协程优化分支的文档条目
- 清理了已归档主题的相关工作树提示信息
- 更新了 SDK 使用说明以反映当前状态
2026-04-19 21:57:10 +08:00
GeWuYou
da7d03d89d feat(docs): 更新分支文档以反映协程优化工作
- 添加协程优化分支信息到文档
- 更新工作树提示为 GFramework 协程优化
- 添加协程优化优先级标记
2026-04-19 21:47:26 +08:00
coderabbitai[bot]
c3614b5b5d
fix: apply CodeRabbit auto-fixes
Fixed 1 file(s) based on 1 unresolved review comment.

Co-authored-by: CodeRabbit <noreply@coderabbit.ai>
2026-04-19 13:05:36 +00:00
gewuyou
e1e32b2b04 docs(ai-plan): 迁移 coroutine 早期计划
- 新增 coroutine-optimization 主题并整合 legacy local-plan todo,补写缺失 trace 的恢复边界\n- 更新 ai-plan 公共索引与治理跟踪,建立 feat/coroutine-optimization 的 topic 映射\n- 删除 worktree 根目录 legacy local-plan 入口,统一从 ai-plan/public 恢复
2026-04-19 20:51:44 +08:00
gewuyou
84b40a2d23
Merge pull request #256 from GeWuYou/docs/sdk-update-documentation
docs: migrate documentation recovery plan into ai-plan
2026-04-19 18:00:08 +08:00
GeWuYou
88b4dfed12 docs: migrate documentation recovery plan into ai-plan 2026-04-19 17:06:26 +08:00
gewuyou
bac0b0151e
Merge pull request #255 from GeWuYou/fix/analyzer-warning-reduction-batch
docs(ai-plan): 迁移 analyzer 恢复文档到 ai-plan
2026-04-19 16:20:43 +08:00
GeWuYou
a67aa8c305 docs(ai-plan): 迁移 analyzer 恢复文档到 ai-plan
- 新增 analyzer-warning-reduction topic 的 active 与 archive 恢复入口
- 归档 local-plan 中的 RP-001 tracking 和 trace 历史并移除旧目录
- 更新公共索引与 ai-plan-governance 记录并补充迁移验证
2026-04-19 16:12:32 +08:00
gewuyou
011cba3ce3
Merge pull request #254 from GeWuYou/feat/ai-first-config
Feat/ai first config
2026-04-19 15:57:15 +08:00
GeWuYou
235aa8e116 docs(cqrs-rewrite): 更新文档归档说明
- 将文档标识为历史归档快照,用于回溯 CQRS-REWRITE-RP-043 及之前阶段
- 添加说明指导后续在 active todos/ 与 traces/ 维护当前恢复点
- 明确完成阶段需继续归档到历史记录中
2026-04-19 15:38:31 +08:00
coderabbitai[bot]
bc3d50f07e
fix: apply CodeRabbit auto-fixes
Fixed 6 file(s) based on 6 unresolved review comments.

Co-authored-by: CodeRabbit <noreply@coderabbit.ai>
2026-04-19 07:29:01 +00:00
GeWuYou
9b904709d6 docs(ai-plan): 收口主题内归档与恢复入口
- 新增 活跃主题的 archive 目录并归档已完成且已验证的历史 tracking 与 trace\n- 更新 ai-plan 治理规则、README 与 boot skill,明确 active todo 和 trace 必须保持精简\n- 收短 ai-plan-governance、ai-first-config-system 与 cqrs-rewrite 的默认恢复入口并补充归档索引
2026-04-19 15:11:50 +08:00
GeWuYou
406e6f1926 docs(ai-plan): 迁移当前工作树恢复文档到 ai-plan
- 迁移 feat/ai-first-config 工作树的 tracking、next 与 trace 文档到 ai-plan/public/ai-first-config-system\n- 更新 ai-plan 公共索引与治理跟踪,登记当前分支的活跃主题映射\n- 清理 旧本地恢复入口并补充迁移后的结构校验与最小构建验证
2026-04-19 13:00:53 +08:00
gewuyou
f5b3cfd6b1
Merge pull request #253 from GeWuYou/feat/cqrs-optimization
feat: CQRS cache hardening、ai-plan governance
2026-04-19 12:12:48 +08:00
GeWuYou
acd638e807 fix(cqrs): 修正恢复主线与评审提示
- 修复 cqrs-rewrite 跟踪文档的下次恢复建议,使当前主线阶段与 Phase 8 保持一致
- 补充 cqrs-rewrite trace,记录本次 PR review 复核结论与恢复点更新
- 优化 gframework-pr-review 输出,明确 open thread 中的 Addressed in commit 文案仍需本地验证
2026-04-19 11:39:21 +08:00
GeWuYou
c44b0667b5 docs(ai-plan): 修复治理追踪锚点冲突
- 修复 ai-plan 治理 trace 中重复的 Markdown 标题并追加恢复点后缀,消除 MD024 锚点冲突
- 更新 ai-plan 治理 tracking,记录本次 PR review 修正和文本校验结果
2026-04-19 11:35:26 +08:00
gewuyou
c82518aa0d docs(ai-plan): 收口公共计划主题索引
- 重构 ai-plan public 结构为按主题分组并引入归档层级
- 新增 public README worktree 映射并同步 boot 启动入口
- 更新治理 tracking trace 与仓库文档中的 ai-plan 路径约定
2026-04-19 10:46:27 +08:00
GeWuYou
ce5a9d5c06 fix(ai-plan): 修正文档命令示例的 Markdown 歧义
- 修复 ai-plan 跟踪文档中命令示例的嵌套反引号问题
- 优化 rg 匹配串的 Markdown 渲染稳定性,避免 markdownlint 告警
- 保持原有验证语义不变,仅调整展示层面的文档写法
2026-04-19 10:13:28 +08:00
GeWuYou
97b619c0b2 fix(codex): 优化 FPR 的 API 优先审查流程
- 修复 FPR 脚本的 Git 解析、--pr 控制流与 branch 到 PR 的 API 解析路径
- 优化 CodeRabbit summary、CTRF 测试结果与 latest head review threads 的 API-first 提取逻辑
- 更新 skill 文档、agent prompt 与 ai-plan 记录,明确最新提交后 review threads 的优先级
2026-04-19 09:59:36 +08:00
gewuyou
5db27fc80a docs(skill): 补充 PR review 技能触发词
- 补充 `fix pr review` 与 `Use FPR` 作为 `gframework-pr-review` 的快捷触发示例
- 更新 skill 示例列表,降低 PR 审查场景下的调用门槛
2026-04-19 03:27:46 +08:00
GeWuYou
815d91713b chore(license): 添加 Mediator 库的 MIT 许可证文件
- 在 third-party-licenses/Mediator 目录下创建 LICENSE 文件
- 包含完整的 MIT 许可证文本内容
- 添加版权持有者 Martin Othamar 的声明
- 确保许可证条款符合开源项目合规性要求
2026-04-19 03:19:48 +08:00
gewuyou
6ab32032bc refactor(repo): 重构ai-plan目录语义
- 重命名 local-plan 为 ai-plan,并收口 public 与 private 的目录语义
- 更新 AGENTS、README 与 boot skill 的恢复文档路径和安全约束
- 迁移共享 tracking 与 trace 文件到 ai-plan/public,并补充治理说明文档
2026-04-19 03:18:46 +08:00
gewuyou
ce10c1f462 feat(codex): 新增PR评审技能并修复评审问题
- 新增项目级 `-pr-review` 技能与 PR 页面抓取脚本,提取 CodeRabbit 评论、检查结果和测试状态
- 修复 gframework-boot 与 AGENTS 规则文案,使 resume/recovery 与 tracking 条件保持一致
- 更新 Godot 模板与 IController 文档注释中的旧 SourceGenerators Rule 命名空间引用
- 补充 CQRS 迁移 tracking 与 trace 的 RP-042 恢复点、验证结果和后续动作
2026-04-19 03:03:34 +08:00
gewuyou
4eca2f1060 docs(cqrs): 收口 source generator 文档命名空间
- 更新 docs/zh-CN 中 source generator 示例的命名空间到当前公开 API
- 修正文档叙述与 API 参考中的旧聚合模块表述
- 对齐 source generator 家族文档与教程示例的当前模块划分
2026-04-18 23:30:33 +08:00
GeWuYou
d54d770c2f feat(project): 添加GFramework项目配置文件
- 配置包的基本信息包括ID、作者、描述和许可证
- 设置多目标框架支持net8.0、net9.0和net10.0
- 定义包发布相关属性如仓库URL和自动生成包
- 排除多个子目录和测试项目避免参与编译打包
- 聚合核心模块GFramework.Core和GFramework.Game作为项目引用
- 配置README.md文件包含到包中并设置符号包含选项
2026-04-18 23:13:28 +08:00
gewuyou
66b848c6d8 feat(codex): 新增项目级 boot skill
- 新增项目级 .codex/skills/gframework-boot 启动 skill,统一读取 AGENTS.md、环境清单与 local-plan 恢复信息
- 补充任务复杂度分级与 subagent/model 选择规则,约束 boot 阶段的委派流程
- 更新 AGENTS.md 中的 boot 入口约定,明确 skill 与仓库规则的优先级关系
2026-04-18 23:03:46 +08:00
gewuyou
914eb3b26e docs(agents): 新增 ai-libs 只读参考规则
- 新增 ai-libs 目录作为第三方源码只读参考区的仓库约束
- 更新第三方参考说明并要求在计划与 trace 中记录本地参考路径
- 排除 ai-libs 目录
2026-04-18 22:23:03 +08:00
gewuyou
c0ef3b5c00
Merge pull request #252 from GeWuYou/fix/analyzer-warning-reduction-batch-1
fix(analyzers): 降低 Core、Cqrs、Godot 与生成器的构建警告
2026-04-18 21:59:07 +08:00
GeWuYou
adc38cc4f0 docs(logging): 更新日志工厂方法文档
- 为 ConfigurableLoggerFactory.GetLogger 方法添加 ArgumentNullException 异常说明
- 补充了当 name 参数为 null 时的异常抛出情况
- 完善了方法的 XML 注释文档
2026-04-18 21:39:19 +08:00
GeWuYou
5046c9752b fix(review-followup): 修复日志配置空项校验与文档示例
- 修复 ConfigurableLoggerFactory 对 null Appender 配置项的显式校验与 XML 契约
- 补充日志工厂针对 appenders 空项输入的回归测试
- 更新 Godot setting 文档中的 async 示例签名以匹配 ApplyAsync 用法
- 修正 AbstractArchitecture 中 ObserveDestroyCoreAsync 方法里调用await DestroyAsync() 未配置ConfigureAwait(false)的问题
2026-04-18 21:11:26 +08:00
GeWuYou
2c2df5de29 fix(review-followup): 修复失败路径清理与日志契约
- 修复 Godot 模块在附加流程失败时的登记时机,确保后续销毁仍可感知半安装模块
- 更新 ConfigurableLoggerFactory 的 name 空值校验与 minLevel XML 契约,并用可观察行为替换脆弱的反射测试
- 补充 WeakTypePairCache 热路径注释,并新增 Godot 模块安装顺序回归测试
2026-04-18 20:45:37 +08:00
GeWuYou
05de6d1e15 fix(review-followup): 修复Godot安装顺序与日志工厂防御
- 修复 AbstractArchitecture 在锚点未初始化时先执行模块安装的顺序问题,并收紧 GodotYamlConfigEnvironment 的目录枚举异常处理
- 修复 ConfigurableLoggerFactory 对 null 集合、调用方 minLevel 与 AsyncLogAppender 释放路径的处理
- 补充 WeakTypePairCache 与 GodotLocalizationSettingsTests 的 XML 文档,并新增日志工厂回归测试
2026-04-18 20:07:07 +08:00
GeWuYou
e3652db030 fix/review-followups: 修复审查反馈并补充提交流程规则
- 修复 Core、Cqrs、Godot 与 Game 模块中的异常契约、空值校验和线程亲和性问题
- 更新 Settings API 为 ApplyAsync 并同步实现、调用点、测试与中文文档
- 补充 AGENTS.md 中的构建校验、自动提交与分支创建规则
- 整理 Logging、WeakCache 与 Resource 相关实现的行为与文档一致性
2026-04-18 19:37:25 +08:00
GeWuYou
3f25ea5624 feat(core): 添加函数式编程扩展和依赖注入容器实现
- 实现 ResultExtensions 扩展类,提供 Combine、Map、Bind 等函数式操作
- 添加 MicrosoftDiContainer 依赖注入容器,支持单例、瞬态、作用域服务注册
- 实现 CQRS 管道行为和处理器注册功能
- 添加本地化字符串实现和相关工具方法
- 提供线程安全的多读单写锁保护机制
- 实现服务实例的优先级排序和批量获取功能
2026-04-18 16:57:49 +08:00
GeWuYou
23489570bf fix(analyzers): 降低 Core、Cqrs、Godot 与生成器的构建警告
- 清理 GFramework.Core 与 GFramework.Cqrs 中的大量低风险 Meziantou 警告

- 修复 GFramework.Godot 运行时中的 ConfigureAwait、StringComparison 与参数校验告警

- 调整 Core SourceGenerators 中的字符串比较、文件命名与局部长方法问题

- 拆分部分配置与缓存辅助类型文件以消除 file/type mismatch 告警

- 更新 warning reduction 跟踪与执行记录,保留下一批结构性告警的恢复点
2026-04-18 16:47:44 +08:00
gewuyou
22f271e709
Merge pull request #251 from GeWuYou/feat/rich-text-effects-and-color-markers
feat(text): 添加富文本效果系统和颜色标记功能
2026-04-18 15:53:34 +08:00
GeWuYou
11515ff791 feat(godot): 添加富文本标签效果系统支持
- 新增 GfRichTextLabel 组件作为富文本标签宿主
- 实现 IRichTextEffectHost 接口用于效果控制器驱动
- 创建 RichTextEffectsController 处理效果装配逻辑
- 添加 RichTextProfile 配置资源类型
- 引入 RichTextEffectPlan 和 RichTextEffectPlanEntry 类型
- 在 CI 工作流中添加 GFramework.Godot.Tests 项目
- 优化 Godot 测试诊断条件判断逻辑
- 添加富文本效果控制器相关单元测试
2026-04-18 15:47:08 +08:00
GeWuYou
1145f455f3 feat(ci): 添加CI/CD工作流配置文件
- 配置pull request触发的构建和测试流程
- 集成代码质量检查和安全扫描功能
- 设置.NET多版本SDK环境支持
- 配置NuGet包和dotnet工具缓存优化
- 实现Node.js和Bun运行时环境搭建
- 添加配置工具依赖安装和测试执行
- 配置项目构建和单元测试执行流程
- 集成测试报告生成和发布功能
- 实现失败测试项目的错误处理机制
2026-04-18 15:18:37 +08:00
GeWuYou
5cb5a2270b fix(ci): 修复测试项目失败时的输出处理逻辑
- 使用here document格式正确输出失败项目列表到GITHUB_OUTPUT
- 添加EOF分隔符确保多行内容正确传递
- 在失败步骤中读取并显示具体的失败项目名称
- 保持原有的退出码设置确保工作流正确失败
2026-04-18 15:08:53 +08:00
GeWuYou
1665e72115 fix(ci): 修复PR报告权限配置问题
- 添加pull-requests写入权限以支持PR评论功能
- 修改pull-request-report条件避免跨仓库触发错误
2026-04-18 15:05:09 +08:00
GeWuYou
f3d50c6361 refactor(tests): 更新测试代码中的命名空间引用
- 将 RichTextEffectsControllerTests 中的 GFramework.Godot.Text 引用替换为 Godot 相关命名空间
- 使用 Godot.Collections.Array 替代系统数组类型
- 在 GlobalUsings 中添加 GFramework.Godot.Text 的全局引用
- 修复返回类型以使用新的 Array<RichTextEffect> 结构
2026-04-18 14:59:21 +08:00
GeWuYou
1c2a813a52 feat(ci): 添加CI/CD工作流配置和Godot文本效果控制器测试
- 配置GitHub Actions工作流用于PR构建和测试
- 实现代码质量检查和安全扫描功能
- 添加.NET多版本SDK支持和依赖缓存
- 集成MegaLinter和TruffleHog安全工具
- 创建RichTextEffectsController的单元测试覆盖各种场景
- 实现测试报告生成和发布功能
2026-04-18 14:55:31 +08:00
GeWuYou
22882f68c4 feat(text): 添加富文本效果系统和抖动效果实现
- 创建 RichTextEffectBase 基类提供统一的标签命名和环境参数读取逻辑
- 实现 RichTextJitterEffect 抖动效果类,支持振幅和速度参数调节
- 添加 DefaultRichTextEffectRegistry 默认效果注册表管理内置效果映射
- 创建 GfRichTextLabel 组合式富文本标签宿主,集成效果装配逻辑
- 定义 IRichTextEffectRegistry 接口实现效果注册表抽象
- 开发 RichTextEffectsController 装配控制器负责效果集合管理
- 实现 RichTextMarkup 工具类提供语义化富文本标签构建辅助方法
- 添加相关单元测试验证效果控制器和标记工具的功能正确性
2026-04-18 14:17:09 +08:00
GeWuYou
e5ad29314e feat(text): 添加富文本效果系统和颜色标记功能
- 实现 RichTextEffectBase 基类提供统一的标签命名和参数读取逻辑
- 添加 RichTextBlueEffect、RichTextGoldEffect、RichTextGreenEffect 和 RichTextRedEffect 颜色标记效果
- 添加 RichTextFadeInEffect、RichTextFlyInEffect、RichTextJitterEffect 和 RichTextSineEffect 动画效果
- 实现 DefaultRichTextEffectRegistry 默认效果注册表
- 创建 GfRichTextLabel 富文本标签宿主组件
- 添加 IRichTextEffectRegistry 效果注册表接口
- 实现 RichTextEffectEntry、RichTextEffectsController 和 RichTextProfile 配置管理类
- 添加 RichTextMarkup 语义化标签构建辅助方法
- 创建 RichTextMarkupTests 和 RichTextProfileTests 单元测试
2026-04-18 11:58:40 +08:00
gewuyou
2f4fccabf2
Merge pull request #250 from GeWuYou/docs/sdk-update-documentation
docs(sdk): 更新文档规范并添加VitePress配置
2026-04-18 10:28:21 +08:00
coderabbitai[bot]
8ddf1b6eef
fix: apply CodeRabbit auto-fixes
Fixed 1 file(s) based on 1 unresolved review comment.

Co-authored-by: CodeRabbit <noreply@coderabbit.ai>
2026-04-18 02:22:15 +00:00
GeWuYou
ebdc231c07 docs(sdk): 更新文档规范并添加VitePress配置
- 调整文档真实性原则,以源码和测试为首要证据源
- 新增模块README要求,规定所有用户包必须有说明文档
- 更新仓库文档规范,要求根README与文档站点分类一致
- 添加VitePress配置文件,支持中文搜索和泛型转义
- 创建入门指南文档,说明GFramework模块组成和接入路径
- 添加快速开始教程,演示Core模块最小使用示例
- 为Core模块添加详细README文档
- 为Core.Abstractions添加契约层说明文档
- 为Core.SourceGenerators添加源码生成器文档
- 为Game模块添加运行时层详细说明文档
2026-04-18 10:08:05 +08:00
gewuyou
b4459bf600
Merge pull request #249 from GeWuYou/feat/ui-router-base 2026-04-17 23:27:22 +08:00
GeWuYou
f7117254f8 fix(tests): 修复UI路由交互测试中的文档注释和代码块问题
- 为PopAsync测试方法添加了缺失的返回值XML文档注释
- 在Godot页面行为恢复逻辑中添加了正确的代码块括号
- 确保当ResumeFromShow为true时OnResume方法调用的条件判断正确
2026-04-17 23:16:04 +08:00
GeWuYou
ef8530a379 test(UiRouterInteractionTests): 更新UI路由交互测试断言
- 修改modal验证逻辑为验证topmost元素的输入动作掩码、指针输入阻塞和操作输入阻塞属性
- 为_instanceCounter字段查找添加更详细的错误消息以提高调试可读性
- 验证_instanceCounter字段类型是否仍为int类型以确保测试稳定性
- 移除对field变量的null合并操作符调用以简化代码逻辑
2026-04-17 23:08:53 +08:00
GeWuYou
eec8dc8412 test(ui): 添加 UI 路由器交互语义回归测试
- 验证模态层和顶层共享同一套阻塞型默认交互配置
- 验证页面捕获动作后路由分发返回成功的语义
- 验证层级页面排序使用实例自增序号而非字符串顺序
- 验证恢复挂起页面时避免重复调用 OnResume 的问题
- 验证弹出栈顶页面后恢复下层页面的重复触发问题
- 创建测试用路由器、根节点和可配置页面类
- 实现实例计数器设置功能以覆盖边界条件测试
2026-04-17 22:58:29 +08:00
GeWuYou
f011f3158f refactor(global): 统一项目全局命名空间引用
- 在GFramework.Game项目中添加暂停抽象接口的全局引用
- 在GFramework.Game项目中添加日志抽象接口的全局引用
- 从测试项目的UI路由交互测试文件中移除不必要的using声明
- 将测试项目的全局using声明统一到GlobalUsings.cs文件中
- 在GFramework.Godot项目中添加扩展方法的全局引用
- 优化全局命名空间引用的组织结构
2026-04-17 22:51:34 +08:00
GeWuYou
053fd4a371 feat(ui): 添加UI路由基类和接口定义
- 实现UiRouterBase基类,提供页面栈管理和层级UI管理功能
- 定义IUiRouter接口,规范UI界面导航和切换操作
- 添加UI过渡管道机制,支持UI切换处理器注册和执行
- 实现页面栈操作方法,包括Push、Pop、Replace、Clear等
- 添加层级UI管理功能,支持Overlay、Modal、Toast等浮层显示
- 集成暂停管理功能,实现页面可见性驱动的暂停令牌管理
- 提供UI动作分发机制,支持语义动作捕获和分发
- 实现UI交互配置文件UiInteractionProfile,定义页面交互契约
2026-04-17 22:42:37 +08:00
GeWuYou
2e7fd1fc87 feat(ui): 添加UI路由基类和相关接口定义
- 实现UiRouterBase基类,提供页面栈管理和层级UI管理功能
- 定义IUiPageBehavior接口,规范UI页面生命周期方法和状态管理
- 定义IUiRouter接口,统一UI界面导航和切换操作规范
- 实现页面栈操作功能,包括Push、Pop、Replace、Clear等方法
- 实现层级UI管理功能,支持Overlay、Modal、Toast等浮层显示
- 集成UI过渡管道,支持UI切换动画和逻辑处理
- 添加暂停令牌管理,实现页面可见性驱动的暂停控制
- 实现UI动作捕获和分发机制,支持语义动作处理
2026-04-17 22:00:33 +08:00
GeWuYou
665b3e8396 feat(build): 修改项目构建配置和依赖管理
- 添加 Directory.Build.props 统一构建属性配置
- 配置 netstandard2.0 和 netstandard2.1 目标框架
- 集成 Meziantou.Polyfill 提供新特性支持
- 设置 Nullable 启用可空类型检查
- 配置文档文件生成和包标识设置
- 添加 Microsoft.CodeAnalysis 相关包引用
- 配置项目引用和命名空间引入规则
2026-04-17 21:11:56 +08:00
GeWuYou
6b4631edc7 fix(ci): 修复测试失败状态传递问题
- 为测试步骤添加id标识以便后续引用
- 将测试失败状态通过GITHUB_OUTPUT传递给后续步骤
- 添加失败检查步骤确保测试失败时工作流正确终止
- 优化了错误状态的传递机制
2026-04-17 20:13:21 +08:00
GeWuYou
6933d2799a ci(build): 添加CI/CD工作流并修复包依赖配置
- 配置CI工作流支持PR时执行代码质量检查、构建和测试
- 设置发布工作流支持标签推送时自动打包发布到NuGet和GitHub Packages
- 修复源代码生成器项目的包依赖配置,统一使用GFramework.SourceGenerators.Common命名
- 配置多版本.NET SDK支持及相应的缓存策略
- 实现并行测试执行和统一的测试报告生成机制
- 添加安全扫描和代码质量检查集成
2026-04-17 20:13:21 +08:00
dependabot[bot]
c721c5aed1 chore(deps): bump softprops/action-gh-release from 2 to 3
Bumps [softprops/action-gh-release](https://github.com/softprops/action-gh-release) from 2 to 3.
- [Release notes](https://github.com/softprops/action-gh-release/releases)
- [Changelog](https://github.com/softprops/action-gh-release/blob/master/CHANGELOG.md)
- [Commits](https://github.com/softprops/action-gh-release/compare/v2...v3)

---
updated-dependencies:
- dependency-name: softprops/action-gh-release
  dependency-version: '3'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-17 19:36:35 +08:00
dependabot[bot]
086fbb8b98 chore(deps): bump actions/configure-pages from 5 to 6
Bumps [actions/configure-pages](https://github.com/actions/configure-pages) from 5 to 6.
- [Release notes](https://github.com/actions/configure-pages/releases)
- [Commits](https://github.com/actions/configure-pages/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/configure-pages
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-17 19:36:25 +08:00
dependabot[bot]
3466e84f53 chore(deps): bump actions/upload-pages-artifact from 4 to 5
Bumps [actions/upload-pages-artifact](https://github.com/actions/upload-pages-artifact) from 4 to 5.
- [Release notes](https://github.com/actions/upload-pages-artifact/releases)
- [Commits](https://github.com/actions/upload-pages-artifact/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/upload-pages-artifact
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-17 19:36:15 +08:00
dependabot[bot]
eb30d52f00 Bump Meziantou.Polyfill from 1.0.109 to 1.0.110
---
updated-dependencies:
- dependency-name: Meziantou.Polyfill
  dependency-version: 1.0.110
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: Meziantou.Polyfill
  dependency-version: 1.0.110
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-17 19:36:01 +08:00
dependabot[bot]
6181d8a2d8 Bump Microsoft.Extensions.DependencyInjection from 10.0.5 to 10.0.6
---
updated-dependencies:
- dependency-name: Microsoft.Extensions.DependencyInjection
  dependency-version: 10.0.6
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-17 19:35:47 +08:00
dependabot[bot]
790a024858 Bump Microsoft.Extensions.DependencyInjection.Abstractions from 10.0.5 to 10.0.6
---
updated-dependencies:
- dependency-name: Microsoft.Extensions.DependencyInjection.Abstractions
  dependency-version: 10.0.6
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-17 19:35:33 +08:00
gewuyou
df0071d506
Merge pull request #246 from GeWuYou/refactor/cqrs-dispatcher-cache
Refactor/cqrs dispatcher cache
2026-04-17 19:34:36 +08:00
gewuyou
68a42eff54
Merge branch 'main' into refactor/cqrs-dispatcher-cache 2026-04-17 19:19:50 +08:00
GeWuYou
0104537615 refactor(config): 优化架构配置集成测试中的警告处理
- 在初始化方法中添加了针对GF_ContextRegistration_003警告的禁用指令
- 通过#pragma warning disable和#pragma warning restore临时禁用了特定警告
- 保持了原有的配置注册表获取和怪物表格数据读取逻辑
- 确保了测试代码的编译清洁性同时维持功能完整性
2026-04-17 19:19:25 +08:00
GeWuYou
3be34156cf docs(cache): 更新 WeakKeyCache 异常文档
- 为 GetOrAdd 方法添加 valueFactory 返回 null 时的异常说明
- 在 GlobalUsings 中添加 System.Runtime.CompilerServices 引用
2026-04-17 19:17:46 +08:00
GeWuYou
45ab38519b feat(cqrs): 添加CQRS运行时实现和中文文档
- 实现了完整的CQRS分发器,支持命令、查询、通知和流式处理
- 添加了弱键缓存机制确保程序集卸载安全
- 实现了管道行为支持,可添加日志、验证等横切关注点
- 提供了类型安全的请求分发和处理器注册功能
- 编写了详细的CQRS中文文档,涵盖基本用法和最佳实践
- 支持编译期生成处理器注册表优化启动性能
2026-04-17 18:12:18 +08:00
gewuyou
e3c23b5aa5
Merge pull request #245 from GeWuYou/feat/config-schema-diagnostics
Feat/config schema diagnostics
2026-04-17 17:57:42 +08:00
GeWuYou
04123d2a71 docs: 添加 CQRS 架构模式与源码生成器完整文档
- 新增 CQRS 核心概念、命令查询处理器实现指南
- 添加安装配置文档,包含各模块包说明与环境要求
- 实现源码生成器全面文档,涵盖 Log、Config Schema、CQRS Handler Registry 等特性
- 提供详细用法示例与最佳实践指导
- 包含常见问题解答与故障排查方案
- 添加 Godot 项目集成与性能优化相关内容
2026-04-17 17:41:38 +08:00
GeWuYou
3aca959fcb docs(tests): 为配置加载器测试添加方法文档注释
- 为 BuildMonsterConfigYaml 方法添加 XML 文档注释
- 为 BuildMonsterSchema 方法添加 XML 文档注释
- 为 IndentLines 方法添加 XML 文档注释
- 补充参数和返回值说明信息
2026-04-17 17:06:55 +08:00
GeWuYou
cfd4ae97d3 fix(tests): 解决测试清理期间的目录删除异常
- 在YamlConfigLoaderAllOfTests的清理方法中添加try-catch块
- 忽略测试拆解期间的目录删除失败异常
- 防止测试因权限或文件锁定问题而意外失败
2026-04-17 16:55:49 +08:00
GeWuYou
389f97b949 feat(generator): 添加JSON schema配置生成器
- 实现了基于JSON schema自动生成配置类型和配置表包装的功能
- 支持嵌套对象、对象数组、标量数组的数据结构生成
- 添加了default/enum/const/ref-table元数据的支持
- 实现了查找索引的自动生成和验证机制
- 集成了字符串格式验证包括date、datetime、email等格式
- 添加了dependentRequired和dependentSchemas的验证支持
- 实现了allOf组合约束的处理和验证
- 生成了配置目录类用于统一管理所有配置表
- 提供了完整的错误诊断和报告机制
2026-04-17 16:43:59 +08:00
GeWuYou
38f98ea7ea docs: 添加 CQRS 架构模式和源代码生成器完整文档
- 新增 CQRS 核心概念、命令查询处理器实现指南
- 添加请求分发器、通知发布和管道行为使用说明
- 提供流式处理、验证行为等高级特性文档
- 完善源代码生成器模块介绍和配置说明
- 包含 Log、ContextAware、EnumExtensions 等生成器详细用法
- 添加 Godot 专用生成器如 GetNode、AutoUiPage 等使用指南
- 整理诊断信息、最佳实践和常见问题解答
2026-04-17 16:33:29 +08:00
GeWuYou
c7516800e7 feat(cqrs): 添加 CQRS 处理器自动注册功能
- 实现 CqrsHandlerRegistrar 类,支持扫描并注册 CQRS 请求/通知/流式处理器
- 添加程序集级源码生成注册器支持,减少冷启动反射开销
- 实现反射回退机制,在生成注册器不可用时进行类型扫描
- 添加进程级缓存机制,避免重复分析程序集元数据和类型加载
- 支持确定性的处理器注册顺序,按名称排序保证稳定性
- 实现类型加载容错机制,部分类型失败时保留其他处理器注册
- 添加完整的单元测试覆盖,验证各种注册场景和错误处理
- 实现日志记录功能,提供详细的注册过程诊断信息
2026-04-17 16:19:35 +08:00
GeWuYou
faa0143799 feat(generator): 添加JSON schema配置生成器
- 实现了基于JSON schema自动生成配置类型和配置表包装的功能
- 支持嵌套对象、对象数组、标量数组的数据结构生成
- 添加了default/enum/const/ref-table元数据映射功能
- 实现了查找索引生成功能,支持唯一键快速检索
- 集成了诊断报告系统,提供详细的错误提示信息
- 生成配置类、表类和绑定类三种类型的源代码
- 支持日期、时间、邮箱等字符串格式验证功能
- 实现了依赖关系验证,确保schema间的引用正确性
2026-04-17 16:18:14 +08:00
GeWuYou
66e1f06f2f docs(config): 添加游戏内容配置系统详细文档
- 新增 YAML 配置源文件支持说明
- 添加 JSON Schema 结构描述功能介绍
- 提供一对象一文件目录组织方式
- 说明运行时只读查询机制
- 详细介绍 Source Generator 生成配置类型功能
- 添加 VS Code 插件配置浏览功能说明
- 提供推荐目录结构和 Schema 示例
- 说明 Godot 文本配置桥接方式
- 添加运行时读取模板和热重载模板
- 说明跨表引用和校验行为
- 提供开发期热重载功能说明
- 添加生成器接入约定说明
- 详细介绍 VS Code 工具功能特性
2026-04-17 15:01:17 +08:00
GeWuYou
3f1a1957b2 feat(config): 添加配置验证模块
- 实现配置架构解析功能,支持对象、数组和标量类型的递归解析
- 添加YAML文件解析和注释提取功能
- 实现配置值的类型验证,包括整数、数字、布尔值和字符串格式验证
- 添加对日期、时间、持续时间、邮箱、URI和UUID等特殊格式的支持
- 实现表单更新应用功能,支持标量值和数组的批量编辑
- 添加配置架构枚举和常量值的处理逻辑
- 实现多语言本地化支持的验证消息系统
- 添加精确十进制计算功能,用于数值倍数约束验证
- 实现YAML标量格式化和反引用功能
- 添加配置架构模式规范化处理,包括正则表达式和格式验证
2026-04-17 15:01:04 +08:00
GeWuYou
be59dc7f27 refactor(cqrs): 优化调度器缓存结构提升性能
- 将通知、请求和流式处理的缓存从多个独立字典合并为统一的分发绑定结构
- 减少热路径上的重复字典查询操作,提升分发性能
- 重构请求分发绑定缓存,按响应类型分层避免值类型装箱开销
- 添加完整的调度绑定单元测试验证缓存行为正确性
- 简化通知和流式处理的缓存查找逻辑,统一调用模式
2026-04-17 14:21:56 +08:00
GeWuYou
160842d093 docs(config): 添加配置系统详细文档和分析器规则清单
- 新增 AnalyzerReleases.Unshipped.md 包含 12 条配置模式分析器规则
- 添加游戏配置系统完整文档,涵盖 YAML 配置源文件和 JSON Schema 结构描述
- 提供推荐目录结构和 Schema 示例,支持一对象一文件的目录组织
- 介绍 Source Generator 生成配置类型、表包装和注册访问辅助功能
- 包含 VS Code 插件配置浏览、校验和表单编辑入口说明
- 提供 Godot 文本配置桥接和热重载模板示例
- 详细说明运行时校验行为和跨表引用机制
- 添加开发期热重载和生成器接入约定说明
- 包含 VS Code 工具能力和当前限制说明
2026-04-17 14:19:11 +08:00
GeWuYou
6ed4d8da1a feat(config): 添加配置 schema 诊断和验证功能
- 新增 ConfigSchemaDiagnostics 类提供配置 schema 代码生成相关诊断
- 添加 JSON 解析错误、根对象检查、ID字段要求等12种诊断规则
- 实现配置验证逻辑,支持整数、数字、布尔值、邮箱等格式校验
- 添加日期时间、持续时间、URI、UUID 等字符串格式验证
- 实现 YAML 解析和注释提取功能
- 提供配置样本生成和批量编辑更新功能
- 添加模式匹配和格式验证的正则表达式支持
2026-04-17 14:17:12 +08:00
gewuyou
59dfb68add
Merge pull request #244 from GeWuYou/refactor/cqrs-and-config-system
Refactor/重构CQRS处理程序注册生成器以支持反射回退属性
2026-04-17 13:15:24 +08:00
GeWuYou
b7a476456a feat(cqrs): 为CQRS处理器注册生成器添加详细文档注释并改进测试验证
添加了完整的XML文档注释到Execute方法,详细说明了CQRS处理器注册生成器的执行流程、参数含义、实现逻辑和注意事项。同时改进了测试框架,在GeneratorExecutionResult中分离了生成代码的编译诊断,使测试能够更精确地验证生成代码的质量。
2026-04-17 12:58:34 +08:00
gewuyou
263586b139
Merge branch 'main' into refactor/cqrs-and-config-system 2026-04-17 12:44:09 +08:00
gewuyou
7d25f4cb98
Merge pull request #243 from GeWuYou/feature/game-content-config-system
docs(config): 添加配置系统文档和分析器规则清单
2026-04-17 12:43:34 +08:00
GeWuYou
bcde9f644e feat(rule): 添加上下文感知基类和生成器实现
- 新增 ContextAwareBase 抽象类提供手动继承的上下文感知基础实现
- 实现 IContextAware 接口的简单实例字段缓存上下文功能
- 添加 ContextAwareGenerator 源代码生成器自动生成上下文感知实现
- 生成器支持 partial 类的 ContextAware 特性标记自动实现
- 提供 CqrsHandlerRegistryGenerator 生成 CQRS 处理器注册器减少运行时反射扫描
2026-04-17 11:47:56 +08:00
GeWuYou
cde234ddea test(config): 添加YAML配置加载器dependentSchemas约束功能测试
- 实现YAML配置加载器对对象级dependentSchemas约束的运行时行为验证
- 添加dependentSchemas不满足时抛出异常的测试用例
- 添加触发字段缺席时不误触发dependentSchemas检查的测试用例
- 添加dependentSchemas满足时正常加载并保留额外字段的测试用例
- 添加非对象类型dependentSchemas声明时抛出异常的测试用例
- 添加触发字段未在同级properties中声明时的错误处理测试
- 添加dependentSchemas条件子schema非object类型时的验证测试
- 实现临时目录管理以避免不同测试场景间的数据污染
- 提供完整的测试辅助方法包括文件创建、schema构建等功能
2026-04-17 11:47:06 +08:00
GeWuYou
57a006caeb chore(build): 添加 C# 命名规范验证脚本
- 实现了 PascalCase 命名规则检查功能
- 集成了 Git 文件遍历和 grep 文本匹配
- 支持排除特定目录如 Godot 模板和测试快照
- 验证命名空间和目录路径的大小写规范
- 提供详细的违规信息报告和错误定位
- 包含字母数字字符和缩写命名规则校验
2026-04-17 10:58:42 +08:00
GeWuYou
9ec83fa56a feat(source-generators): 添加CQRS处理器注册器和枚举扩展生成器
- 实现了CqrsHandlerRegistryGenerator用于自动生成CQRS处理器注册器
- 添加了EnumExtensionsGenerator用于自动生成枚举相关的扩展方法
- 创建了ContextAwareGenerator为标记类自动生成IContextAware接口实现
- 支持运行时类型引用的安全编码和反射回退机制
- 实现了精确的运行时类型引用描述和泛型类型处理
- 添加了完整的诊断报告和错误处理机制
2026-04-17 10:44:09 +08:00
GeWuYou
2486352341 test(config): 添加YAML配置加载器dependentSchemas约束测试
- 验证触发字段出现但条件schema未满足时抛出异常
- 验证触发字段缺席时不会误触发dependentSchemas检查
- 验证触发字段出现且条件schema满足时正常加载对象
- 验证非对象dependentSchemas声明在解析阶段被拒绝
- 验证dependentSchemas触发字段必须在同级properties中显式声明
- 验证dependentSchemas只接受object-typed条件子schema
- 实现临时目录创建和清理避免文件堆积
- 提供完整的测试用例覆盖dependentSchemas各种场景
2026-04-17 10:15:04 +08:00
GeWuYou
b19877f970 feat(source-generators): 添加多个代码生成器功能
- 新增 PriorityGenerator 为标记 Priority 特性的类自动生成 IPrioritized 接口实现
- 新增 EnumExtensionsGenerator 为枚举自动生成 Is 和 IsIn 扩展方法
- 新增 LoggerGenerator 为标记 Log 特性的类自动生成日志字段
- 新增 ContextAwareGenerator 为标记 ContextAware 特性的类自动生成 IContextAware 接口实现
- 新增 CqrsHandlerRegistryGenerator 为 CQRS 处理器生成编译时注册器减少运行时反射开销
2026-04-17 10:07:57 +08:00
GeWuYou
01a815a518 feat(config): 添加配置验证工具和代码分析规则
- 实现配置架构解析器和验证功能
- 添加YAML解析和注释提取功能
- 创建配置验证诊断规则表格
- 实现批量编辑器支持的字段提取
- 添加字符串格式验证(日期、邮箱、UUID等)
- 创建示例配置YAML生成功能
- 实现表单更新应用到YAML的功能
- 添加常量和枚举值的元数据处理
- 实现精确小数倍数验证算法
- 添加配置模式规范化和比较功能
2026-04-17 09:43:23 +08:00
GeWuYou
35a1634697 feat(cqrs): 添加 CQRS 处理器注册器源代码生成器
- 实现了 CqrsHandlerRegistryGenerator 源代码生成器
- 减少运行时程序集反射扫描成本提高性能
- 支持 IRequestHandler、INotificationHandler 和 IStreamRequestHandler 接口
- 生成静态注册代码避免运行时动态发现处理器
- 实现精确的运行时类型引用解析机制
- 支持跨程序集类型的反射查找功能
- 添加了日志记录和错误处理机制
- 实现了类型安全的依赖注入注册过程
2026-04-17 09:26:01 +08:00
GeWuYou
5185247c35 docs(config): 添加配置系统文档和分析器规则清单
- 创建游戏内容配置系统详细文档,涵盖 YAML 配置、JSON Schema 结构、目录组织等
- 添加配置系统的当前能力说明,包括运行时查询、生成器支持等功能特性
- 完善 Schema 示例和 YAML 示例,提供完整的配置定义和数据样例
- 整理推荐接入模板,包含目录结构、csproj 配置、启动帮助器等最佳实践
- 补充运行时读取模板、生成查询辅助、Architecture 接入等高级使用方式
- 添加运行时校验行为说明,涵盖跨表引用、格式验证、约束检查等内容
- 提供开发期热重载功能文档,说明自动刷新运行时表的工作机制
- 创建 VS Code 工具使用指南,介绍浏览、编辑、校验等开发辅助功能
- 生成分析器规则清单文件,记录所有配置相关的诊断规则和严重级别
2026-04-17 08:47:10 +08:00
GeWuYou
d0b4946bba test: 增强快照测试基础设施,添加安全验证和覆盖率改进
- 在 EnumExtensionsGeneratorSnapshotTests.cs 中补充 snapshotFileNameSelector 的 null 分支覆盖,新增默认快照文件名选择器用例及对应快照资产

- 强化 GeneratorSnapshotTest.cs 的快照路径校验,拒绝空白文件名、绝对路径和目录遍历攻击;将辅助器改为通过 Roslyn GeneratorDriver 读取真实生成结果并验证编译,消除仅依赖 TestState.GeneratedSources 导致的空跑风险

- 新增 GeneratorSnapshotTestSecurityTests.cs 安全回归测试,覆盖绝对路径拒绝和目录逃逸防护两个分支

- 将 Priority、Logger、ContextAware 三组生成器测试统一指向仓库内快照目录,并补齐缺失的快照资产以支持现在强制执行的生成验证
2026-04-17 07:40:36 +08:00
gewuyou
1d6ff223d5
Merge pull request #235 from GeWuYou/refactor/cqrs-and-config-system
refactor: 移除 Mediator 兼容性 API 并重组源生成器项目结构
2026-04-16 22:50:39 +08:00
GeWuYou
fe27dfe609 test(generator): 添加源代码生成器快照测试框架和枚举扩展生成器测试
- 实现 GeneratorSnapshotTest 类用于源代码生成器的快照测试功能
- 添加 EnumExtensionsGeneratorSnapshotTests 测试类验证各种枚举配置的输出
- 创建完整的快照测试基础设施支持生成器输出验证
- 配置测试项目依赖和快照文件管理规则
- 生成多个测试场景的快照文件验证枚举扩展生成功能
2026-04-16 22:34:09 +08:00
GeWuYou
8e38afc6c4 docs(generator): 更新配置生成器方法参数文档
- 添加 isDirectChildOfRoot 参数说明到 ParseProperty 方法
- 添加 isIndexedLookup 参数说明到 ParseArrayProperty 方法
2026-04-16 22:17:19 +08:00
GeWuYou
30e3ca05fd feat(enum): 添加枚举扩展方法生成器功能
- 实现 EnumExtensionsGenerator 自动生成枚举扩展方法
- 支持 GenerateIsMethods 和 GenerateIsInMethod 两种生成开关
- 添加完整的单元测试和快照验证机制
- 实现 IsIn 扩展方法支持多值匹配功能
- 支持带显式位标志值的枚举生成扩展方法
- 提供灵活的属性参数配置选项
2026-04-16 22:16:06 +08:00
GeWuYou
08b12ae852 test(EnumExtensions): 添加枚举扩展生成器快照测试
- 实现基本枚举的 IsMethods 快照测试
- 实现基本枚举的 IsInMethod 快照测试
- 实现带标志值枚举的快照测试
- 实现禁用 IsMethods 选项的快照测试
- 实现禁用 IsInMethod 选项的快照测试
- 创建统一的源代码构建方法用于测试场景
2026-04-16 21:49:59 +08:00
GeWuYou
534818f5f6 docs(source-generators): 添加源代码生成器文档和相关常量定义
- 新增完整的 GFramework.SourceGenerators 文档,涵盖所有核心特性
- 添加 Log 属性生成器、Config Schema 生成器等详细使用说明
- 添加 ContextAware、GenerateEnumExtensions 等属性生成器文档
- 添加 Godot 专用生成器如 GetNode、BindNodeSignal 等使用指南
- 添加 AutoRegisterModule、AutoUiPage、AutoScene 等自动化工具文档
- 添加诊断信息、性能优势、使用示例和最佳实践章节
- 新增 PathContests 常量类定义 GFramework 项目路径常量
- 添加 ContextRegistrationAnalyzerTests 测试类验证上下文注册分析器
2026-04-16 21:40:47 +08:00
GeWuYou
9f9a421b6c docs(source-generators): 添加源代码生成器文档和抽象包项目
- 新增完整的 GFramework.SourceGenerators 文档,涵盖所有生成器功能
- 添加 Log 属性生成器、ContextAware 属性生成器、Config Schema 生成器等详细说明
- 包含 Godot 专用生成器如 GetNode、BindNodeSignal、AutoUiPage 等使用指南
- 提供诊断信息、性能优势、使用示例和最佳实践章节
- 创建 Core.SourceGenerators.Abstractions 项目文件和配置
- 集成 Meziantou.Analyzer 和 Meziantou.Polyfill 包引用
- 配置项目构建属性和命名空间引入设置
2026-04-16 21:16:23 +08:00
GeWuYou
0cf4945e78 docs(config): 添加游戏内容配置系统文档
- 新增 CQRS 架构模式详细文档,包括命令查询职责分离核心概念
- 添加命令、查询、处理器、请求分发器等基本用法示例
- 包含高级用法如通知、管道行为、流式处理等完整功能介绍
- 提供最佳实践指南和常见问题解决方案
- 添加游戏内容配置系统文档,涵盖 YAML 配置源文件和 JSON Schema 结构描述
- 包含推荐目录结构、Schema 示例和 YAML 示例配置
- 提供完整的接入模板,包括 csproj 配置、启动帮助器和运行时读取模板
- 添加 Godot 文本配置桥接、热重载和 Architecture 接入等高级功能说明
2026-04-16 21:01:01 +08:00
GeWuYou
09f751a4f7 docs: 添加 CQRS 架构模式和游戏配置系统文档
- 新增 CQRS 核心概念、命令查询处理器实现指南
- 添加 CQRS 高级用法包括通知发布、管道行为和流式处理
- 提供 CQRS 最佳实践和常见问题解决方案
- 添加游戏配置系统完整接入模板和运行时读取示例
- 包含 YAML 配置文件和 JSON Schema 结构定义说明
- 提供 Godot 引擎配置桥接和热重载功能使用指南
- 添加架构模块集成和生成查询辅助功能文档
2026-04-16 20:36:15 +08:00
gewuyou
d8831733ff
Merge pull request #234 from GeWuYou/refactor/cqrs-architecture-decoupling
Refactor/cqrs architecture decoupling
2026-04-16 19:53:44 +08:00
gewuyou
52e40a185c
Merge pull request #233 from GeWuYou/refactor/cqrs-architecture-decoupling-todo-11
feat(generator): 添加运行时发现处理器接口的日志名称记录功能
2026-04-16 19:47:27 +08:00
GeWuYou
823be21779 feat(generator): 添加运行时发现处理器接口的日志名称记录功能
- 在 HandlerCandidateAnalysis 结构中新增 RuntimeDiscoveredHandlerInterfaceLogNames 字段
- 为运行时发现的处理器接口创建日志名称收集器并存储显示名称
- 修改构造函数和属性以支持新的日志名称数组字段
- 更新相等性比较逻辑以包含运行时发现接口日志名称的比较
- 在生成的代码中添加注释显示剩余的运行时接口发现目标
- 更新单元测试验证生成的注释内容是否正确包含接口名称
2026-04-16 19:40:26 +08:00
gewuyou
e96623b7f5
Merge pull request #232 from GeWuYou/refactor/cqrs-architecture-decoupling-todo-10
Refactor/cqrs architecture decoupling todo 10
2026-04-16 19:14:24 +08:00
gewuyou
82ae73424e
Merge pull request #231 from GeWuYou/feature/game-content-config-system
Feature/Implement dependentRequired schema validation across runtime and tooling
2026-04-16 19:11:30 +08:00
GeWuYou
163077589e refactor(tests): 调整全局引用顺序
- 将 Microsoft.CodeAnalysis.CSharp 引用添加到 GlobalUsings.cs
- 重新排列引用顺序以符合代码风格规范
2026-04-16 19:08:03 +08:00
GeWuYou
45bcffc6ee test(cqrs): 添加 CQRS 处理器注册生成器测试
- 创建 MetadataReferenceTestBuilder 工具类用于构建内存元数据引用
- 实现 CreateFromSource 方法将源码编译为内存程序集并返回元数据引用
- 添加 GetRuntimeMetadataReferences 方法获取当前运行时可信平台程序集引用
- 创建 CqrsHandlerRegistryGeneratorTests 测试类验证 CQRS 处理器注册生成器功能
- 添加多种测试用例验证不同场景下的处理器注册行为
- 包含嵌套处理器、隐藏实现、数组类型参数、泛型类型定义等边界情况测试
- 实现混合直接注册和精确重建注册的测试验证
- 添加对外部基类保护类型处理器的支持测试
- 验证生成器优先处理隐藏处理器而不输出遗留回退标记的功能
2026-04-16 19:06:34 +08:00
GeWuYou
31b6285bbd test(cqrs): 添加 CQRS 分发器缓存功能的单元测试
- 验证相同消息类型重复分发时不会重复扩张服务类型与调用委托缓存
- 验证 request 调用委托会按响应类型分别缓存避免不同响应类型共用 object 结果桥接
- 实现通过反射读取 dispatcher 静态缓存字典的测试辅助方法
- 添加清空 dispatcher 静态缓存的方法避免跨用例共享进程级状态
- 创建多个测试数据模型和处理器用于验证不同的缓存场景
- 实现异步流消费方法确保建流路径被真实执行
2026-04-16 19:06:20 +08:00
GeWuYou
73b63777ce feat(cqrs): 添加CQRS处理器注册器源代码生成器
- 实现CqrsHandlerRegistryGenerator源代码生成器
- 减少运行时程序集反射扫描开销
- 支持IRequestHandler、INotificationHandler和IStreamRequestHandler接口
- 生成静态注册代码替代运行时动态发现
- 提供精确的运行时类型引用描述功能
- 实现泛型类型和数组类型的反射处理
- 添加日志记录和错误处理机制
- 支持跨程序集类型引用和内部类型反射查找
- 生成符合IServiceCollection的服务注册代码
2026-04-16 19:06:11 +08:00
GeWuYou
9fadde0a44 test(config): 添加配置验证功能的全面单元测试
- 实现了对嵌套对象和对象数组元数据捕获的测试
- 添加了标量、对象、数组、整数和布尔类型常量元数据测试
- 验证了空字符串常量原始值和显示元数据的保留功能
- 测试了对象常量可比较键的构建逻辑
- 实现了嵌套映射和对象数组解析功能的测试
- 验证了复杂映射键的保留功能
- 添加了缺失和未知嵌套属性报告的测试
- 实现了对象数组项目问题检测功能的测试
- 验证了深层枚举不匹配的报告功能
- 测试了标量常量不匹配检测功能
- 实现了各种类型常量匹配验证的测试
- 验证了对象常量比较标准化但保持数组顺序的功能
- 添加了对象和数组常量不匹配检测的测试
- 实现了整数和布尔常量标量标准化及不匹配测试
- 验证了数字范围和字符串长度不匹配检测功能
- 测试了独占边界、模式和数组项目计数不匹配检测
- 实现了支持字符串格式验证的测试
- 验证了受支持字符串格式接受功能
- 添加了独占最大值和最大项目违规检测的测试
- 实现了对象属性计数不匹配报告功能的测试
- 验证了唯一对象属性计数约束功能
- 测试了倍数和唯一项目违规检测功能
- 实现了包含匹配计数违规报告的测试
- 验证了结构无效项目时跳过包含匹配计数功能
- 测试了仅值级违规时继续包含匹配计数功能
- 实现了最大包含违规检测的测试
- 验证了满足包含约束接受功能
- 测试了对象包含匹配允许额外声明字段功能
- 实现了大十进制倍数无浮点漂移接受的测试
- 验证了非实际倍数大数字拒绝功能
- 测试了科学记数法数字接受功能
- 实现了Unicode语义应用模式的测试
- 验证了无效数组项目跳过唯一项目检查功能
- 测试了一次通过报告每个唯一项目重复功能
- 实现了避免不同对象唯一项目可比较键冲突的测试
- 验证了标量范围和长度元数据捕获功能
- 测试了独占边界、模式和数组项目计数元数据捕获
- 实现了支持字符串格式元数据捕获的测试
2026-04-16 18:48:15 +08:00
GeWuYou
eca2d67529 feat(cqrs): 添加CQRS处理器注册器源代码生成器
- 实现了CqrsHandlerRegistryGenerator源代码生成器
- 为CQRS处理器减少运行时程序集反射扫描开销
- 支持IRequestHandler、INotificationHandler和IStreamRequestHandler接口
- 提供静态类型引用和运行时反射发现的混合注册策略
- 生成服务注册代码并添加调试日志记录功能
- 实现精确的运行时类型引用描述和泛型类型处理
2026-04-16 18:41:20 +08:00
GeWuYou
ed5d11576d docs(config): 添加配置系统文档和分析器规则定义
- 创建 AnalyzerReleases.Unshipped.md 定义41条新规则
- 添加游戏内容配置系统详细文档,涵盖YAML配置、JSON Schema结构、目录组织等
- 实现运行时只读查询功能,支持多种数据验证约束
- 集成Source Generator生成配置类型、表包装和访问辅助
- 提供VS Code插件支持配置浏览、编辑和校验功能
- 实现热重载机制支持开发期动态配置更新
- 添加Godot引擎文本配置桥接支持
- 提供Architecture架构接入模板和运行时读取接口
2026-04-16 18:25:48 +08:00
GeWuYou
594dffdd50 feat(config): 添加配置 schema 诊断和 VS Code 扩展工具
- 实现了配置 schema 代码生成相关的诊断功能
- 添加了 VS Code 扩展工具用于配置文件管理和验证
- 提供配置文件树视图和表单预览功能
- 实现配置文件的批量编辑功能
- 集成 schema 验证和错误提示机制
- 支持配置文件的引用导航和快速访问
- 添加多语言本地化支持
2026-04-16 17:34:24 +08:00
GeWuYou
1792fafc85 refactor(Cqrs): 重构CQRS处理器注册生成逻辑以支持混合注册类型
- 修改注册条件判断逻辑,支持多种注册类型的组合处理
- 新增有序注册实现方法,统一处理直接、反射和精确反射注册
- 添加注册类型枚举以区分不同的注册方式
- 实现混合注册场景下的稳定排序机制
- 更新反射注册逻辑以支持更复杂的类型解析
- 优化代码结构提升可读性和维护性
- 添加单元测试验证各种混合注册场景的正确性
2026-04-16 17:24:52 +08:00
GeWuYou
a8386c1759 feat(cqrs): 添加 CQRS 分发器实现及缓存测试
- 实现了 GFramework 自有 CQRS 运行时分发器,支持请求/通知/流式请求处理
- 添加了多层级缓存机制,包括服务类型缓存、调用委托缓存、按响应类型分层缓存
- 实现了上下文感知处理器的自动注入功能
- 集成了管道行为链处理机制,支持中间件模式的请求处理
- 添加了完整的缓存测试用例,验证各种消息类型的缓存命中与复用逻辑
- 优化了反射调用性能,避免热路径中的重复类型构造与装箱操作
2026-04-16 17:07:04 +08:00
gewuyou
692671a9ec
Merge pull request #230 from GeWuYou/refactor/cqrs-architecture-decoupling-todo-9
Refactor/Decouple handler registry generator from interface discovery reflection
2026-04-16 16:12:59 +08:00
GeWuYou
082b2403c7 feat(cqrs): 添加 CQRS 处理器注册器源代码生成器
- 实现了 CqrsHandlerRegistryGenerator 源代码生成器
- 减少运行时程序集反射扫描成本,提升性能
- 支持 IRequestHandler、INotificationHandler 和 IStreamRequestHandler 接口
- 自动为 CQRS 处理器生成服务注册代码
- 提供精确的运行时类型引用和反射注册功能
- 包含直接引用、数组和泛型类型的支持
- 生成带有日志记录的处理器注册代码
2026-04-16 15:56:48 +08:00
gewuyou
1b3140a0dc
Merge pull request #229 from GeWuYou/feature/game-content-config-system
feat(config): 添加enum约束验证和相关测试
2026-04-16 15:24:53 +08:00
GeWuYou
33dd108697 feat(config): 添加配置验证工具功能
- 实现了JSON Schema解析和YAML验证功能
- 添加了对象和数组枚举值的比较验证逻辑
- 实现了配置文件的采样生成功能
- 添加了批量编辑器的数值更新功能
- 实现了配置路径和注释提取功能
- 添加了多种数据格式验证支持包括日期、邮箱、UUID等
- 实现了常量和枚举值的元数据处理功能
- 添加了配置验证诊断信息生成功能
- 实现了表单更新应用到YAML的功能
- 添加了字符串排序比较算法确保工具一致性
2026-04-16 15:12:02 +08:00
GeWuYou
a8cb82e2f1 feat(config): 添加配置验证功能支持枚举对象和数组
- 实现 parseSchemaContent 函数解析对象和数组枚举元数据
- 添加 validateParsedConfig 验证对象值是否在枚举声明范围内
- 支持数组枚举候选项的顺序敏感比较
- 优化诊断信息避免父对象枚举不匹配的重复报告
- 添加测试用例验证枚举对象和数组的解析与验证功能
- 实现可编辑字段收集功能支持批量编辑器更新
- 添加 YAML 解析和注释提取功能用于表单预览
- 实现配置验证诊断生成功能支持本地化消息
- 添加格式化和规范化函数支持不同数据类型的处理
2026-04-16 14:50:46 +08:00
gewuyou
f25353db8c feat(cqrs-generator): 支持泛型与数组类型重建并优化隐藏处理器绑定 2026-04-16 14:24:00 +08:00
GeWuYou
809e1f5ded docs(config): 添加游戏内容配置系统完整文档
- 新增 YAML 配置与 JSON Schema 结构描述支持
- 添加一对象一文件的目录组织方式说明
- 实现运行时只读查询功能详细文档
- 添加 Source Generator 生成配置类型的完整指南
- 集成 VS Code 插件提供配置浏览和校验功能
- 添加 Godot 文本配置桥接的使用说明
- 实现热重载模板和 Architecture 接入示例
- 添加运行时校验行为和错误处理机制
- 提供开发期热重载功能的详细配置方法
- 添加生成器接入约定和工具使用说明
2026-04-16 14:18:25 +08:00
GeWuYou
76bb9671d5 feat(cqrs): 添加 CQRS 处理器注册生成器
- 实现 CqrsHandlerRegistryGenerator 源代码生成器
- 为 CQRS 请求处理器、通知处理器和流请求处理器生成注册代码
- 减少运行时程序集反射扫描开销
- 支持直接类型引用和反射加载两种注册方式
- 提供完整的单元测试验证生成器功能
- 实现对私有嵌套类型的反射注册支持
2026-04-16 12:50:02 +08:00
gewuyou
ba6a358df1
Merge pull request #228 from GeWuYou/refactor/cqrs-architecture-decoupling-todo-8
Refactor/Add CQRS dispatcher caching and refactor handler registration
2026-04-16 12:30:14 +08:00
GeWuYou
4951fb0254 feat(cqrs): 添加 CQRS 分发器和服务注册生成器
- 实现 CqrsDispatcher 类,支持请求/通知/流式请求的分发处理
- 添加进程级缓存机制,优化热路径中的反射和类型构造性能
- 实现上下文感知处理器的 CQRS 分发上下文注入功能
- 开发 CqrsHandlerRegistryGenerator 源代码生成器,减少运行时反射扫描
- 添加完整的单元测试验证缓存机制和服务类型注册功能
- 支持管道行为链处理和异步流式请求响应模式
2026-04-16 12:19:44 +08:00
GeWuYou
b07da252c4 refactor(cqrs): 优化并发处理能力
- 在 CqrsDispatcher 中添加 Concurrent 包引用以支持线程安全操作
- 在全局引用文件中增加 Concurrent 包引用,统一并发编程支持
- 为后续的并发处理逻辑改进奠定基础架构支持
2026-04-16 11:53:07 +08:00
GeWuYou
06f95db593 feat(cqrs): 添加CQRS调度器实现和改进处理器注册机制
- 实现GFramework自有CQRS运行时分发器,支持请求/通知/流式请求处理
- 添加进程级缓存机制优化反射调用性能,包括请求、通知、流水线调用委托缓存
- 重构CqrsHandlerRegistrar使用ReflectionFallbackMetadata替代字符串类型名
- 引入CqrsReflectionFallbackAttribute支持运行时补充反射扫描的处理器类型
- 添加完整的CQRS处理器注册单元测试,验证有序执行和容错行为
- 修复MicrosoftDiContainer中异常消息的格式化空白问题
- 实现上下文感知处理器的CQRS分发上下文注入功能
2026-04-16 11:36:31 +08:00
gewuyou
a3f5010247
Merge pull request #227 from GeWuYou/feature/game-content-config-system
Feature/game content config system
2026-04-16 11:19:02 +08:00
GeWuYou
a14e736fb9 test(config): 添加YAML配置加载器的not约束运行时行为验证测试
- 实现标量值命中not子schema时的异常抛出验证
- 验证值未命中not子schema时的正常加载行为
- 测试对象完整命中禁用schema时的约束失败触发
- 验证对象仅命中not schema属性子集时的正确处理
- 添加not声明为非对象值时的解析阶段拒绝验证
- 创建临时目录隔离测试环境避免用例间污染
- 实现配置文件和schema文件的动态创建功能
- 提供标量和对象两种not约束场景的测试加载器
2026-04-16 11:11:52 +08:00
GeWuYou
391e3e9813 feat(cqrs): 添加CQRS处理器自动注册功能
- 实现CqrsHandlerRegistrar类,支持扫描并注册CQRS请求/通知/流式处理器
- 添加源码生成注册器优先策略,减少冷启动时的反射开销
- 实现运行时反射扫描回退机制,确保处理器注册的完整性
- 添加CqrsReflectionFallbackAttribute特性,标记需要运行时补充扫描的程序集
- 创建完整的单元测试套件,验证处理器注册顺序与容错行为
- 实现CqrsHandlerRegistryGenerator源码生成器,自动生成处理器注册代码
- 添加详细的日志记录与诊断功能,便于调试注册过程
- 实现类型安全的处理器映射验证与重复注册检测机制
2026-04-16 11:11:29 +08:00
GeWuYou
ebc53510ab test(config): 添加配置验证功能的全面单元测试
- 实现了对嵌套对象和数组元数据解析的测试
- 添加了常量值比较和对象排序一致性的验证测试
- 创建了对YAML解析器嵌套映射和复杂键名的支持测试
- 开发了针对缺失和未知属性的验证诊断测试
- 实现了对象数组项目验证和深度枚举匹配测试
- 添加了标量、对象、数组、整数和布尔型常量验证测试
- 创建了数字范围和字符串长度限制验证测试
- 实现了独占边界、模式匹配和数组项目计数验证
- 添加了支持的字符串格式验证(日期、时间、邮箱等)
- 创建了多重约束和唯一性检查验证测试
- 实现了包含匹配计数约束验证测试
- 添加了科学记数法和大数精度处理验证测试
- 创建了Unicode模式匹配和唯一项重复检测测试
2026-04-16 10:51:30 +08:00
GeWuYou
0f5b3a98bf docs(config): 添加游戏内容配置系统完整文档
- 新增 YAML 配置源文件支持说明
- 添加 JSON Schema 结构描述功能介绍
- 实现一对象一文件的目录组织方式
- 提供运行时只读查询机制说明
- 添加 Source Generator 类型生成功能文档
- 集成 VS Code 插件配置浏览功能说明
- 添加跨表引用和校验行为详细说明
- 提供热重载开发期工具使用指南
- 完善 Godot 引擎文本配置桥接文档
- 补充 Architecture 模块接入模板说明
2026-04-16 09:59:43 +08:00
gewuyou
21627c0381
Merge pull request #226 from GeWuYou/refactor/cqrs-architecture-decoupling-todo-7
Refactor/cqrs architecture decoupling todo 7
2026-04-16 09:57:50 +08:00
GeWuYou
ba15d9d0f6 docs(config): 添加游戏内容配置系统完整文档
- 新增游戏内容配置系统详细介绍文档
- 包含 YAML 配置源文件和 JSON Schema 结构描述说明
- 提供推荐目录结构和 Schema 示例配置
- 添加官方启动帮助器 GameConfigBootstrap 使用指南
- 包含 Godot 文本配置桥接和运行时读取模板
- 提供 Architecture 推荐接入模板和热重载配置说明
- 添加运行时校验行为和开发期热重载功能说明
- 包含生成器接入约定和 VS Code 工具使用指南
- 新增 JavaScript 配置验证实现和格式校验模式
- 添加字符串格式校验包括 date、email、uuid 等类型
- 实现配置字段可编辑性检测和批量编辑功能支持
2026-04-16 09:26:56 +08:00
GeWuYou
a4dfc78201 feat(ioc): 添加Microsoft DI容器适配器及测试
- 实现MicrosoftDiContainer类,包装IServiceProvider为IIocContainer接口
- 提供线程安全的依赖注入容器功能,支持单例、瞬态、作用域服务注册
- 添加RegisterSingleton、RegisterTransient、RegisterScoped等多种注册方法
- 实现RegisterPlurality方法支持一个实例注册到多个接口类型
- 添加CQRS相关注册功能,包括管道行为和处理器自动注册
- 实现Get、GetAll、GetRequired等服务解析方法
- 添加容器冻结机制,冻结后构建ServiceProvider提供服务解析
- 实现CreateScope方法支持服务作用域创建
- 添加完整的单元测试覆盖各种注册和解析场景
- 实现服务按优先级排序功能支持系统调度需求
2026-04-16 09:26:05 +08:00
GeWuYou
6d5d9e2240 docs(config): 添加游戏内容配置系统完整文档
- 新增游戏内容配置系统详细介绍文档
- 包含 YAML 配置源文件支持说明
- 提供 JSON Schema 结构描述功能说明
- 说明一对象一文件的目录组织方式
- 介绍运行时只读查询功能特性
- 详细说明 Runtime / Generator / Tooling 共享支持的约束类型
- 提供 Source Generator 生成配置类型的完整说明
- 包含 VS Code 插件功能详细介绍
- 提供推荐目录结构和 Schema 示例
- 说明 YAML 示例格式和接入模板
- 详细说明 Godot 文本配置桥接功能
- 提供运行时读取模板和生成查询辅助说明
- 包含 Architecture 接入模板和热重载配置说明
- 详细说明运行时校验行为和跨表引用机制
- 提供开发期热重载功能完整配置指南
- 说明生成器接入约定和 VS Code 工具功能
- 包含当前限制和独立 Config Studio 评估说明
- 新增配置验证 JavaScript 工具实现
2026-04-16 09:16:50 +08:00
GeWuYou
0d9d09bc4a feat(ioc): 添加Microsoft DI容器适配器及测试
- 实现MicrosoftDiContainer类作为IIocContainer接口的适配器
- 提供线程安全的依赖注入容器功能
- 支持单例、瞬态、作用域服务注册
- 实现CQRS处理器注册功能
- 添加服务工厂方法注册支持
- 实现按优先级排序的服务获取功能
- 添加完整的单元测试覆盖基本功能和边界情况
- 支持容器冻结和作用域创建功能
- 实现多样性实例注册到多个接口的功能
2026-04-16 09:14:27 +08:00
GeWuYou
00a1038d0a refactor(GFramework.Cqrs): 添加全局using引用System.Reflection
- 在GlobalUsings.cs文件中新增System.Reflection的全局引用
- 便于后续代码中直接使用Reflection相关功能
- 减少重复的using声明语句
2026-04-16 08:52:39 +08:00
GeWuYou
bc9336428e feat(cqrs): 添加 CQRS 处理器注册器和源码生成器
- 实现 CqrsHandlerRegistrar 类用于扫描并注册 CQRS 处理器
- 添加源码生成器自动生成 CQRS 处理器注册器减少反射开销
- 实现运行时回退机制在生成注册器不可用时使用反射扫描
- 添加完整的单元测试验证处理器注册顺序和容错行为
- 支持请求、通知和流式处理器的自动注册功能
- 实现稳定的处理器注册顺序保证跨环境一致性
- 添加详细的诊断日志记录注册过程和异常情况
2026-04-16 08:49:13 +08:00
GeWuYou
a7604de804 feat(ioc): 添加 Microsoft DI 容器适配器和 CQRS 运行时模块
- 实现 MicrosoftDiContainer 类,提供对 Microsoft.Extensions.DependencyInjection 的适配
- 添加线程安全的依赖注入容器功能,支持单例、瞬态和作用域服务注册
- 实现 CqrsRuntimeModule 模块,用于注册 CQRS 运行时组件
- 添加 CqrsRuntimeFactory 工厂类,提供 CQRS 运行时实现的创建入口
- 实现 DefaultCqrsRegistrationService,处理 CQRS 处理器的程序集注册
- 添加 CqrsTestRuntime 测试工具类,为测试环境提供 CQRS 运行时访问
- 支持多种注册方式包括实例注册、类型映射和工厂方法
- 实现服务获取、查询和生命周期管理功能
- 添加容器冻结机制以构建服务提供者
- 支持 CQRS 管道行为和处理器的批量注册功能
2026-04-16 08:37:40 +08:00
GeWuYou
1973fb2a60 feat(ioc): 添加Microsoft DI容器适配器和CQRS运行时模块
- 移除过时的Cqrs抽象引用
- 添加MicrosoftDiContainer实现IIocContainer接口
- 提供线程安全的依赖注入容器功能
- 支持单例、瞬态、作用域生命周期管理
- 实现CQRS请求管道行为注册功能
- 添加CqrsRuntimeModule服务模块
- 提供CQRS运行时实现和处理器注册器
- 扩展IArchitectureContext接口支持CQRS契约
2026-04-16 07:32:17 +08:00
gewuyou
385893c791
Merge pull request #225 from GeWuYou/refactor/cqrs-architecture-decoupling-todo-6
feat(cqrs): 添加CQRS运行时模块和兼容性扩展
2026-04-15 23:02:54 +08:00
GeWuYou
922ad43b5e fix(cqrs): 修复CQRS命名空间兼容性测试中的类型解析问题
- 更新注释以更准确描述基础消息类型的命名空间暴露方式
- 将Type.GetType的throwOnError参数从true改为false以避免异常抛出
- 调整测试逻辑以更好地处理类型解析场景
2026-04-15 22:59:46 +08:00
GeWuYou
7b63a65f51 refactor(tests): 重构CQRS类型转发测试以使用新命名空间
- 更新测试方法名称从 GFramework_Core_Assembly_Should_Forward_Legacy_Base_Types_To_Runtime_Assembly
  为 Type_Forwarding_Should_Resolve_Cqrs_Types_From_Core_Assembly
- 将断言中的程序集限定名从 GFramework.Core.Cqrs.* 更新为 GFramework.Cqrs.*
- 保持对命令、查询、请求和通知基类型的验证逻辑不变
2026-04-15 22:52:26 +08:00
GeWuYou
ff9b010639 refactor(cqrs): 调整基础消息类型的命名空间和程序集布局
- 将基础消息类型从遗留的Core.Cqrs命名空间迁移到新的Cqrs命名空间
- 保持运行时程序集承载实现的架构设计
- 更新测试方法名称以反映新的命名空间结构
- 确保公共API兼容性的同时优化组件组织结构
2026-04-15 22:51:31 +08:00
GeWuYou
7a2127b50e refactor(cqrs): 更新Cqrs命名空间路径
- 将GFramework.Core.Cqrs.Command更改为GFramework.Cqrs.Command
- 将GFramework.Core.Cqrs.Query更改为GFramework.Cqrs.Query
- 将GFramework.Core.Cqrs.Request更改为GFramework.Cqrs.Request
- 将GFramework.Core.Cqrs.Notification更改为GFramework.Cqrs.Notification
2026-04-15 22:51:10 +08:00
GeWuYou
7e402d91d3 docs(cqrs): 修正泛型类型参数的XML文档注释
- 修正NotificationBase中TInput类型的XML文档注释,将input更正为INotificationInput
- 修正QueryBase中TInput类型的XML文档注释,将TResponse更正为IQueryInput
- 修正RequestBase中TInput类型的XML文档注释,将TResponse更正为IRequestInput
2026-04-15 22:50:21 +08:00
GeWuYou
b747787b87 refactor(core): 更新类型转发器和测试文件的命名空间引用
- 在 TypeForwarders.cs 中添加 Cqrs 相关命名空间引用
- 在 CqrsPublicNamespaceCompatibilityTests.cs 中同步更新命名空间导入
- 在 CqrsTestRuntime.cs 中补充 Command 命名空间引用
- 确保所有测试运行时环境的命名空间一致性
2026-04-15 22:36:55 +08:00
GeWuYou
12c9c8a9ec refactor(cqrs): 迁移CQRS基础类型实现并维护程序集兼容性
- 将CommandBase、QueryBase、RequestBase、NotificationBase类型从Core模块迁移到独立Cqrs模块
- 在GFramework.Core中添加TypeForwarder维持向后兼容性
- 创建CqrsPublicNamespaceCompatibilityTests验证运行时程序集转发功能
- 更新CqrsTestRuntime移除对已迁移类型的直接引用
- 为所有基础类型添加统一输入模型支持和命名空间兼容性注释
- 实现完整的CQRS抽象基类重构以支持模块化架构
2026-04-15 22:27:55 +08:00
GeWuYou
005c32d84f feat(cqrs): 添加CQRS扩展方法兼容层和日志工厂解析器
- 新增ContextAwareMediatorCommandExtensions提供命令扩展方法兼容性支持
- 新增ContextAwareMediatorQueryExtensions提供查询扩展方法兼容性支持
- 添加LoggerFactoryResolver实现全局日志工厂访问入口
- 实现TypeForwarders将核心类型转发到正确程序集
- 添加MediatorCompatibilityDeprecationTests验证弃用策略
- 扩展LoggerFactoryTests覆盖并发初始化和回退逻辑
- 迁移CommandBase到Core.Cqrs.Command命名空间
- 移动LoggingBehavior到GFramework.Cqrs.Cqrs.Behaviors
- 添加AbstractStreamQueryHandler支持流式查询处理
- 创建NotificationBase提供通知基类实现
2026-04-15 22:27:09 +08:00
GeWuYou
18337c5995 refactor(tests): 移除未使用的 System.Diagnostics 引用
- 从 GlobalUsings.cs 中删除未使用的 System.Diagnostics 全局引用
- 保持测试项目的全局引用列表整洁
- 减少不必要的命名空间导入
2026-04-15 21:54:29 +08:00
GeWuYou
1c7558aeb8 refactor(cqrs): 移除旧日志行为并添加CQRS运行时模块
- 删除 LoggingBehavior 类及其相关实现
- 新增 CqrsRuntimeModule 用于注册CQRS运行时组件
- 添加 ArchitectureComponentRegistryBehaviorTests 测试组件注册行为
- 添加 ArchitectureContextTests 测试架构上下文功能
- 完善CQRS运行时的并发安全性和生命周期管理
2026-04-15 21:41:59 +08:00
GeWuYou
e36c80229a feat(cqrs): 添加CQRS处理器基类和测试运行时支持
- 引入AbstractCommandHandler、AbstractQueryHandler等各类处理器基类
- 实现CqrsContextAwareHandlerBase提供上下文感知功能
- 添加CqrsTestRuntime为测试项目提供CQRS运行时访问入口
- 创建AbstractCqrsHandlerContextTests验证上下文注入行为
- 支持命令、查询、通知及流式处理的各种抽象基类实现
2026-04-15 20:34:08 +08:00
GeWuYou
a80ff59631 feat(cqrs): 添加CQRS运行时模块和兼容性扩展
- 新增ContextAwareMediatorCommandExtensions提供命令扩展方法的兼容性别名
- 新增ContextAwareMediatorExtensions提供CQRS统一接口扩展方法的兼容性别名
- 新增ContextAwareMediatorQueryExtensions提供查询扩展方法的兼容性别名
- 添加CqrsRuntimeModule用于注册CQRS运行时和处理器注册器到依赖注入容器
- 更新IArchitectureContext接口添加新版CQRS请求、命令、查询和通知的统一入口
- 添加架构上下文的CQRS处理器注册相关单元测试
- 配置项目文件以支持多目标框架和包引用管理
2026-04-15 19:42:08 +08:00
gewuyou
f7b4ae9995
Merge pull request #224 from GeWuYou/refactor/cqrs-architecture-decoupling-todo-5
Refactor/cqrs architecture decoupling todo 5
2026-04-15 19:18:13 +08:00
GeWuYou
d881bd5ad1 refactor(cqrs): 简化接口定义并分离流式命令和查询接口
- 移除 ICommand<TResponse> 和 ICommand 的空实现体
- 移除 IQuery<TResponse> 和 IStreamQuery<TResponse> 的空实现体
- 移除 INotification、IRequest<TResponse>、IStreamRequest<TResponse> 的空实现体
- 将 IStreamCommand<TResponse> 分离到独立文件中
- 将 IStreamQuery<TResponse> 分离到独立文件中
- 保持所有接口的核心功能不变,仅简化语法结构
2026-04-15 19:02:53 +08:00
GeWuYou
fe73d13991 chore(tests): 添加Cqrs抽象依赖到架构测试
- 在ArchitectureContextTests中添加GFramework.Cqrs.Abstractions.Cqrs命名空间引用
2026-04-15 18:55:41 +08:00
GeWuYou
a068a5e707 test(arch): 优化架构上下文并发测试的超时配置
- 将工作线程数量从16调整为8
- 添加工作线程启动超时设置为5秒
- 添加首次解析超时设置为5秒
- 使用可配置超时替代硬编码的1秒等待时间
- 提高测试稳定性和可读性
2026-04-15 18:52:53 +08:00
GeWuYou
2425d28097 refactor(tests): 更新测试文件以支持Cqrs功能
- 在ArchitectureContextTests.cs中添加GFramework.Cqrs.Abstractions.Cqrs命名空间引用
- 在MicrosoftDiContainerTests.cs中添加GFramework.Cqrs.Abstractions.Cqrs命名空间引用
- 为测试文件提供必要的Cqrs相关依赖注入支持
2026-04-15 17:49:52 +08:00
GeWuYou
82e6332a9b test(core): 添加架构上下文和依赖注入容器的单元测试
- 实现 ArchitectureContext 类的全面单元测试,覆盖构造函数、查询命令事件发送等功能
- 添加 MicrosoftDiContainer 依赖注入容器的完整测试,包括注册、获取、冻结等操作
- 创建 CqrsTestRuntime 测试基础设施,提供对 CQRS 处理器注册的受控访问
- 测试并发场景下的线程安全性,验证多线程环境下容器操作的正确性
- 实现优先级排序功能测试,确保服务按优先级正确排序和注册
- 添加各种边界条件测试,包括空参数异常处理和重复注册异常检测
2026-04-15 17:47:54 +08:00
GeWuYou
81897ce2ac docs(source-generators): 添加源码生成器文档
- 新增 AutoRegisterExportedCollections 生成器文档
- 新增 AutoScene 生成器文档
- 新增 AutoUiPage 生成器文档
- 新增完整的源码生成器索引文档
- 详细介绍各生成器的使用方法和参数说明
- 提供生成代码示例和诊断信息说明
- 包含性能优势和使用示例章节
2026-04-15 17:00:49 +08:00
GeWuYou
f9cc1237a3 chore(project): 初始化项目结构和测试配置
- 创建 GFramework.Core.Tests 和 GFramework.Cqrs.Tests 测试项目
- 配置测试项目的全局 using 语句和依赖引用
- 添加主项目 GFramework 的元包配置文件
- 生成解决方案文件并配置所有项目引用关系
- 设置多目标框架支持 net8.0、net9.0 和 net10.0
- 配置包发布设置和仓库信息
2026-04-15 16:22:09 +08:00
GeWuYou
e2001766cb feat(arch): 添加架构上下文实现及完整测试
- 实现 ArchitectureContext 类,提供对系统、模型、工具等组件的访问
- 集成 CQRS runtime,支持命令、查询、事件的执行管理
- 添加服务缓存机制,优化容器解析性能
- 实现并发安全的 CQRS runtime 懒加载
- 提供同步和异步的请求处理方法
- 支持优先级排序的服务实例获取
- 添加完整的单元测试覆盖构造函数、查询、命令、事件等功能
- 配置测试项目依赖和全局引用
- 实现共享的 CQRS 测试运行时支持
2026-04-15 15:57:08 +08:00
GeWuYou
932235e8cc refactor(tests): 更新CqrsCoroutineExtensionsTests中的命名空间引用
- 添加GFramework.Core.Coroutine.Extensions命名空间引用
- 保持现有测试功能完整性
- 优化代码结构以匹配最新框架变更
2026-04-15 15:36:08 +08:00
GeWuYou
ede8a8faa4 fix(namespace): 修正命名空间
- 修正Core模块命名空间
- 修正Godot模块命名空间
2026-04-15 15:34:14 +08:00
GeWuYou
aba304f667 test(cqrs): 添加CQRS处理器注册器单元测试
- 验证通知处理器按稳定名称顺序执行而非依赖反射枚举顺序
- 测试部分类型加载失败时保留可加载类型并记录诊断日志
- 验证源码生成注册器优先级高于反射扫描机制
- 测试生成注册器元数据损坏时回退到反射扫描路径
- 实现确定性通知处理器执行顺序验证功能
- 添加捕获型日志工厂提供程序用于测试断言
- 修正命名空间从Core.Tests.Logging到Cqrs.Tests.Logging
2026-04-15 15:28:51 +08:00
GeWuYou
28cdf791df refactor(tests): 移除项目警告级别配置
- 移除了 GFramework.Cqrs.Tests 项目的 WarningLevel 配置
- 使测试项目遵循默认警告级别设置
2026-04-15 15:27:14 +08:00
GeWuYou
1c5c5c812a chore(deps): 更新 Meziantou.Analyzer 和 Meziantou.Polyfill 依赖包版本
- 将 Meziantou.Analyzer 从 2.0.264 版本升级到 3.0.46 版本
- 将 Meziantou.Polyfill 从 1.0.71 版本升级到 1.0.109 版本
2026-04-15 15:26:38 +08:00
GeWuYou
49ed5d0d06 refactor(tests): 添加CQRS抽象层依赖项
- 在ContainerRegistrationFixtures.cs中添加GFramework.Core.Abstractions.Cqrs命名空间引用
- 在MicrosoftDiContainerTests.cs中添加GFramework.Core.Abstractions.Cqrs命名空间引用
- 统一测试文件中的依赖注入配置
- 确保CQRS相关接口的正确引用路径
2026-04-15 15:22:00 +08:00
GeWuYou
34e140e919 feat(ioc): 添加 Microsoft DI 容器适配器和 CI/CD 工作流
- 实现 MicrosoftDiContainer 类,提供 Microsoft.Extensions.DependencyInjection 的适配器
- 添加 DefaultCqrsHandlerRegistrar 默认 CQRS 处理器注册器实现
- 配置 GitHub Actions CI/CD 工作流,包含代码质量检查和构建测试任务
- 设置 .NET 8/9/10 多版本支持和缓存策略
- 添加单元测试覆盖 IoC 容器的各项功能,包括注册、解析和生命周期管理
- 实现线程安全的读写锁机制保护容器操作
- 支持 CQRS 处理器和管道行为的注册管理
2026-04-15 15:13:43 +08:00
GeWuYou
048f96c6cd feat(core): 添加架构上下文和CQRS运行时实现
- 实现ArchitectureContext提供系统、模型、工具等组件访问管理
- 添加CqrsDispatcher作为GFramework自有CQRS运行时分发器
- 集成Microsoft.Extensions.DependencyInjection作为IoC容器适配器
- 实现完整的命令、查询、事件处理机制
- 支持上下文感知处理器注入架构上下文
- 提供管道行为链处理机制
- 实现流式请求处理功能
- 添加服务实例缓存和优先级排序支持
2026-04-15 14:41:53 +08:00
gewuyou
3dbe1053fb
Merge pull request #223 from GeWuYou/refactor/cqrs-architecture-decoupling-todo-4
feat(core): 扩展 CQRS 处理器注册 API 并完善文档
2026-04-15 13:21:31 +08:00
GeWuYou
a01ec8d29c fix(ci): 修复PR扫描的基线和头版本配置
- 将基础提交哈希从 github.event.before 更新为 github.event.pull_request.base.sha
- 将当前提交哈希从 github.sha 更新为 github.event.pull_request.head.sha
- 确保PR工作流正确比较基线和目标分支的差异
2026-04-15 13:20:31 +08:00
coderabbitai[bot]
2329cba3a6
fix: apply CodeRabbit auto-fixes
Fixed 1 file(s) based on 1 unresolved review comment.

Co-authored-by: CodeRabbit <noreply@coderabbit.ai>
2026-04-15 05:07:59 +00:00
GeWuYou
49df81e46f refactor(tests): 重构 CQRS 处理程序测试架构
- 移除自定义测试架构类,改用现有的 SyncTestArchitecture
- 将 RegisterCqrsHandlersFromAssembly 测试方法中的架构创建逻辑提取为统一方法
- 更新重复程序集注册去重测试,验证不同 Assembly 实例但相同程序集键的情况
- 简化测试架构初始化逻辑,使用 AddPostRegistrationHook 替代自定义配置
- 调整注释文档以反映新的测试架构创建方式
- 移除 GitHub 工作流中对 main 分支的限制条件
2026-04-15 12:59:12 +08:00
GeWuYou
340b6cae90 chore(ci): 更新GitHub Actions工作流配置
- 移除push触发器,仅保留pull request触发CI构建测试
- 添加CodeQL静态代码分析工作流,支持安全漏洞检测
- 配置每日凌晨2点定时执行CodeQL分析
- 设置.NET 8.0.x运行时环境支持
- 启用C#语言自动构建模式进行代码扫描
2026-04-15 12:51:59 +08:00
GeWuYou
0cd1e9e83a feat(ci): 添加CI/CD工作流和CQRS命令接口
- 配置CI构建和测试工作流,支持多.NET版本和并发测试
- 添加CodeQL静态代码分析工作流
- 实现自动版本递增和标签创建工作流
- 定义CQRS命令接口规范,包括响应式和流式命令
- 为架构测试添加空值参数异常文档注释
2026-04-15 12:47:22 +08:00
GeWuYou
27266d037d feat(arch): 添加架构基础类和依赖注入容器实现
- 创建 Architecture 基类提供系统、模型、工具等组件的注册与管理功能
- 实现架构生命周期管理、初始化流程控制和阶段转换功能
- 添加 ArchitectureModules 模块管理器负责 CQRS 行为注册和模块安装
- 实现 MicrosoftDiContainer 依赖注入容器适配器
- 支持单例、瞬态、作用域服务注册和工厂方法注册
- 添加 CQRS 请求管道行为和处理器注册功能
- 实现线程安全的读写锁保护容器操作
- 提供服务获取、排序和优先级管理功能
2026-04-15 12:38:45 +08:00
GeWuYou
4db7923512 docs(core): 添加 CQRS 架构模式详细文档
- 完整介绍 CQRS 核心概念包括命令、查询、处理器和分发器
- 提供命令和查询的定义与实现示例代码
- 详细介绍处理器编写方法和注册流程
- 说明管道行为(Behaviors)的使用方式
- 展示通知(Notification)和流式处理功能
- 提供最佳实践和常见问题解决方案
- 包含完整的 API 参考和用法示例
2026-04-15 11:44:44 +08:00
gewuyou
f59e8f7a1f
Merge pull request #222 from GeWuYou/refactor/cqrs-architecture-decoupling-todo-3
Refactor/Deprecate Mediator alias and introduce source-generated CQRS handler registry
2026-04-15 11:20:19 +08:00
GeWuYou
7a6f966601 feat(cqrs): 添加 CQRS 处理器注册生成器
- 实现 CqrsHandlerRegistryGenerator 源代码生成器
- 支持 IRequestHandler、INotificationHandler 和 IStreamRequestHandler 接口的处理器注册
- 生成程序集级别的 CQRS 处理器注册器以减少运行时反射开销
- 添加对请求、通知和流处理器的稳定顺序注册支持
- 实现对私有嵌套处理器的检测和回退机制
- 提供字符串字面量转义功能以避免生成代码中的语法错误
- 添加完整的单元测试验证生成器的功能和边界条件
2026-04-15 11:12:36 +08:00
GeWuYou
fd64423741 docs(core): 添加 CQRS 架构模式完整文档
- 新增 CQRS 核心概念介绍,包括命令、查询、处理器和分发器
- 添加基本用法示例,展示命令和查询的定义与发送流程
- 实现高级功能文档,涵盖请求、通知、管道行为和流式处理
- 提供最佳实践指南,明确命令查询分离和验证行为使用方式
- 增加常见问题解答,解释 Command/Query 区别和错误处理方案
- 新增 CQRS 处理器自动注册实现,支持源码生成和反射扫描
- 添加单元测试验证处理器注册顺序和容错行为
- 更新项目 AI 代理说明文档,完善模块依赖关系图
2026-04-15 10:21:20 +08:00
GeWuYou
295496e90f docs(core): 添加 CQRS 文档并实现架构模块管理
- 添加完整的 CQRS 中文文档,涵盖命令、查询、处理器、管道行为等核心概念
- 实现 ArchitectureModules 类用于管理架构模块安装和 CQRS 行为注册
- 重构 Architecture 类为协调器模式,委托给专门的管理器组件
- 添加 RegisterCqrsPipelineBehavior 方法替代旧的 RegisterMediatorBehavior
- 标记旧的扩展方法为 Obsolete 并提供新的兼容性别名
- 实现模块化架构组件注册和生命周期管理功能
2026-04-15 09:49:26 +08:00
gewuyou
779c521a20
Merge pull request #221 from GeWuYou/refactor/cqrs-architecture-decoupling-todo-2
Replace Mediator pattern with CQRS pipeline behavior registration
2026-04-15 09:12:46 +08:00
GeWuYou
c0e2e9a640 docs(coroutine): 更新CqrsCoroutineExtensions文档
- 添加了TaskCanceledException异常说明文档
- 详细描述了命令调度取消时的异常情况
- 补充了底层命令调度相关的异常处理说明
2026-04-15 09:05:22 +08:00
GeWuYou
4c0a99d24c fix(coroutine): 优化协程扩展中的异常处理机制
- 添加 TaskCanceledException 映射以统一取消状态处理
- 保留原始异常调用栈以避免调试时丢失异常来源
- 优先解包业务异常以避免直接暴露 AggregateException
- 使用 ExceptionDispatchInfo.Capture 确保异常栈信息完整
2026-04-15 08:25:52 +08:00
GeWuYou
96ffd49b31 fix(coroutine): 更新CQRS协程扩展的异常处理文档
- 将TaskCanceledException更改为Exception以反映实际抛出的异常类型
- 更新异常描述以准确说明在未提供onError时的行为
- 修正文档以反映底层原始异常的传递机制
2026-04-15 08:24:48 +08:00
GeWuYou
5a2981a557 feat(cqrs): 添加 CQRS 命令协程扩展功能
- 实现 CqrsCoroutineExtensions 扩展类,提供协程方式发送 CQRS 命令的功能
- 添加 SendCommandCoroutine 方法支持命令异步执行与异常处理
- 实现取消操作的特殊处理逻辑,区分取消、失败和成功状态
- 添加 ContextAwareCqrsCommandExtensions 扩展类,提供同步和异步命令发送方法
- 增加对 TaskCanceledException 的专门处理机制
- 完善相关单元测试,验证取消操作的异常处理行为
2026-04-15 08:18:27 +08:00
GeWuYou
088f02d586 docs(core): 添加 CQRS 文档并完善相关扩展方法
- 新增 CQRS 核心概念、命令查询处理器使用指南
- 添加管道行为、流式处理和最佳实践说明
- 实现 CQRS 协程扩展方法支持异步命令执行
- 添加 ContextAware 接口的 CQRS 命令查询扩展
- 集成 Microsoft DI 容器依赖注入支持
- 补充架构模块行为测试验证功能完整性
- 扩展 GameContext 测试用例提高代码覆盖率
2026-04-15 07:34:01 +08:00
GeWuYou
115fe65e88 docs(core): 添加 CQRS 和核心框架文档
- 新增 CQRS 模块详细文档,介绍命令查询职责分离模式
- 添加核心框架架构概述和五层架构设计说明
- 补充快速开始指南和最佳实践建议
- 完善包说明和组件联动机制介绍
- 添加架构生命周期管理和模块化设计说明
2026-04-14 22:54:27 +08:00
GeWuYou
5c112f8545 docs(core): 添加 CQRS 和核心框架文档
- 新增 CQRS 详细文档,介绍命令查询职责分离模式
- 添加核心框架概述文档,包含架构图和快速开始指南
- 详细介绍五层架构设计和组件联动机制
- 提供完整的最佳实践和设计理念说明
- 添加架构生命周期管理和模块化设计说明
2026-04-14 22:30:59 +08:00
gewuyou
156fd4df2f
Merge pull request #220 from GeWuYou/refactor/cqrs-architecture-decoupling-todo-1
Replace Mediator runtime with built-in CQRS
2026-04-14 22:12:40 +08:00
GeWuYou
f8fa2a8481 feat(cqrs): 添加流式命令处理器和自动注册功能
- 实现 AbstractStreamCommandHandler 基类支持流式命令处理
- 创建 CqrsHandlerRegistrar 自动扫描注册 CQRS 处理器
- 添加流式处理器接口 IStreamRequestHandler 支持
- 实现处理器注册的容错机制和类型加载恢复
- 添加确定性排序确保跨环境稳定的处理器注册顺序
- 提供完整的单元测试验证注册行为和异常处理
2026-04-14 22:05:20 +08:00
GeWuYou
195c8321a1 feat(cqrs): 添加CQRS命令查询责任分离架构支持
- 实现抽象命令处理器基类支持命令处理
- 添加流式命令处理器基类支持异步流式响应
- 创建查询处理器基类提供统一查询处理接口
- 实现查询基类提供通用查询结构定义
- 扩展架构上下文接口集成CQRS运行时入口
- 定义消息处理器委托支持管道行为处理
- 实现CQRS处理器注册器扫描并注册处理器
- 添加架构模块行为测试验证模块安装功能
- 创建中介器高级特性测试覆盖边界场景
2026-04-14 21:37:32 +08:00
GeWuYou
618f07369e config(ci): 配置Coderabbit以支持重构分支的自动审查
- 启用auto_review功能以进行代码审查
- 添加refactor/cqrs-architecture-decoupling作为基础分支
- 配置草稿PR时不进行审查的选项
- 设置聊天自动回复功能
2026-04-14 20:56:11 +08:00
gewuyou
48e57c8547 Replace Mediator runtime with built-in CQRS 2026-04-14 20:46:59 +08:00
GeWuYou
c2ee2209fd docs(community): 添加问题模板和缺陷报告模板
- 创建了 Bug Report 模板,支持中英双语,包含模块选择、版本信息、复现步骤等字段
- 添加了 Question 模板,用于使用咨询和技术问答
- 配置了预提交检查项,确保提交前完成必要验证
- 设计了结构化的表单字段,便于收集准确的问题信息
- 实现了多语言支持,提升社区协作体验
2026-04-14 13:13:06 +08:00
GeWuYou
396bb1566a docs(contributing): 更新贡献指南并添加标准 Issue 模板
- 更新问题报告指引,整合 Bug、功能、文档、咨询四类模板
- 优化 Issue 分诊建议,明确 bug、enhancement、documentation、question 分类
- 修订 PR 提交流程说明,统一模板使用要求
- 新增 README 项目介绍文档,包含模块说明、安装指导等内容
- 添加标准化 Issue 模板配置,支持 Bug 报告、功能建议、文档改进、使用咨询
- 完善 GitHub Issue 配置,提供模板搜索与文档链接指引
2026-04-14 13:06:00 +08:00
gewuyou
6b5acbd99a
Merge pull request #217 from GeWuYou/feat/godot-source-generators-project-metadata 2026-04-14 09:58:48 +08:00
GeWuYou
31a439e184 test(Godot): 添加项目元数据生成器测试
- 验证基于 project.godot 的 AutoLoad 和 Input Action 强类型入口生成
- 测试 AutoLoad 类型非节点继承时的诊断报告功能
- 验证 Input Action 标识符冲突时的后缀追加和警告机制
- 测试多个显式映射指向同一 AutoLoad 时的重复检测
- 验证不同命名空间同名节点类型的隐式映射冲突处理
- 测试 AutoLoad 和 Input Action 重复条目的诊断和保留逻辑
- 验证缺失或空 project.godot 文件时的无生成行为
2026-04-14 09:51:52 +08:00
GeWuYou
bb7abc0d8f test(Godot): 添加项目元数据生成器测试
- 验证 AutoLoad 和 Input Action 强类型入口生成
- 测试非节点类型上的 AutoLoad 标记诊断
- 验证输入动作标识符冲突处理和后缀追加
- 测试多个显式映射指向相同 AutoLoad 的重复检测
- 验证不同命名空间同名节点类型的冲突处理
- 测试 AutoLoad 标识符冲突的诊断和后缀追加
- 验证项目文件中重复 AutoLoad 条目的处理
- 测试重复输入动作条目的诊断和保留机制
2026-04-14 09:23:49 +08:00
GeWuYou
833a295b84 feat(godot): 添加 Godot 集成功能和测试基础设施
- 新增 AdditionalTextGeneratorTestDriver 用于源生成器测试
- 添加 AutoLoadAttribute 特性支持 AutoLoad 类型映射
- 扩展项目构建目标,支持自定义 project.godot 路径验证
- 创建完整 Godot 集成教程文档,涵盖节点生命周期、信号系统等功能
- 添加源代码生成器测试项目配置和相关依赖包引用
2026-04-14 09:05:33 +08:00
GeWuYou
7dafec72be docs(docs): 添加文档配置和API参考
- 新增.vitepress/config.mts配置文件,包含本地搜索、代码块保护等功能
- 添加API参考文档,涵盖核心架构、事件系统、属性系统等完整API
- 添加源码生成器文档,介绍Log、ContextAware、EnumExtensions等生成器用法
- 配置多语言导航和侧边栏结构,完善文档站点设置
- 添加代码示例和使用指南,提供完整的框架使用参考
2026-04-14 08:22:28 +08:00
GeWuYou
61ee3a8f0c feat(Godot.SourceGenerators): 添加 Godot 项目元数据源码生成器
- 实现 project.godot 文件解析功能,支持 AutoLoad 和 Input Action 元数据提取
- 生成 AutoLoads 强类型访问入口,提供 GetRequiredNode 和 TryGetNode 方法
- 生成 InputActions 常量类,避免手写字符串魔法值
- 添加 AutoLoadAttribute 特性支持显式类型映射声明
- 实现标识符冲突检测和自动后缀追加机制
- 添加完整的诊断系统支持,包括类型继承检查和重复条目警告
- 创建 MSBuild 集成目标文件确保生成器正确加载
- 提供详细的 README 文档说明使用方法和最佳实践
2026-04-14 08:22:12 +08:00
GeWuYou
b3066f3a8d chore(config): 增加 GitHub 检查超时时间
- 将 github-checks 的 timeout_ms 从 90000 增加到 900000
2026-04-13 23:16:40 +08:00
gewuyou
e6b3cad2a7
Merge pull request #215 from GeWuYou/docs/vitepress-site-config
docs: 添加文档站点配置和开发环境说明
2026-04-13 23:14:41 +08:00
coderabbitai[bot]
12022d661a
fix: apply CodeRabbit auto-fixes
Fixed 1 file(s) based on 2 unresolved review comments.

Co-authored-by: CodeRabbit <noreply@coderabbit.ai>
2026-04-13 15:12:33 +00:00
GeWuYou
7ddf82877e docs: 添加文档站点配置和开发环境说明
- 配置 GitHub Pages 部署工作流,添加 Configure GitHub Pages 步骤
- 集成 demodrive-ai/llms-txt-action 生成 LLM 可读索引文件
- 添加 sitemap.xml 生成和 LLM 产物验证机制
- 创建完整的 VitePress 中文文档配置文件
- 添加开发环境能力清单和 AI 使用约定
- 配置多语言导航和侧边栏结构
- 设置搜索、页脚和社会链接等 UI 组件
2026-04-13 23:00:29 +08:00
gewuyou
713c091dd3
Merge pull request #213 from GeWuYou/docs/api-reference-and-generators
docs(api): 添加 GFramework API 参考文档和源代码生成器文档
2026-04-13 21:58:34 +08:00
GeWuYou
0a7d4adc59 docs(generator): 更新自动生成注册集合文档
- 修正了 GF_AutoExport_004 错误消息描述中的措辞错误
2026-04-13 20:44:01 +08:00
GeWuYou
3d169ca91f docs(generated): 添加源码生成器文档
- 新增 AutoRegisterExportedCollections 生成器文档
- 新增 AutoRegisterModule 生成器文档
- 新增 AutoScene 生成器文档
- 新增 AutoUiPage 生成器文档
- 更新源码生成器总览索引文档
- 添加各生成器的使用示例和参数说明
- 补充诊断信息和使用约束说明
2026-04-13 20:34:51 +08:00
gewuyou
01b32f6cfb
Merge branch 'main' into docs/api-reference-and-generators 2026-04-13 20:28:14 +08:00
gewuyou
59e0c4ea68
Merge pull request #214 from GeWuYou/feat/generator-inheritance-support
feat(generator): 添加对继承层次结构中注册方法的支持
2026-04-13 20:27:43 +08:00
GeWuYou
973a3c3cb4 test(registration): 添加自动注册导出集合生成器测试
- 添加了批量注册方法生成的基础功能测试
- 添加了集合元素类型推断失败时的诊断报告测试
- 添加了数组参数注册方法的生成测试
- 添加了从继承接口获取注册方法的测试
- 添加了显式接口实现成员不可访问的诊断测试
- 添加了从基类获取注册方法的测试
- 添加了从基类获取注册器成员的测试
- 添加了非实例可读集合成员的诊断测试
- 添加了非实例可读注册器成员的诊断测试
- 添加了注册方法不可访问的诊断测试
- 添加了属性参数无效时的诊断测试
- 添加了多个分部声明时只生成一个源文件的测试
2026-04-13 20:18:47 +08:00
GeWuYou
56bc078288 refactor(generator): 优化类型声明关键字生成逻辑
- 将条件判断语句替换为 switch 表达式以提高可读性
- 添加对 partial interface 类型的支持
- 为不支持的类型添加异常处理机制
- 简化代码结构并提升维护性
2026-04-13 20:05:16 +08:00
GeWuYou
eeef5961d7 feat(godot): 添加导出集合自动注册生成器功能
- 实现了 AutoRegisterExportedCollectionsGenerator 源生成器
- 支持扫描标记了 AutoRegisterExportedCollectionsAttribute 的 partial 类型
- 为使用 RegisterExportedCollectionAttribute 声明的集合成员生成集中注册方法
- 提供详细的诊断支持,包括 GF_AutoExport_001 到 GF_AutoExport_008 错误码
- 支持从基类和接口继承链查找注册方法
- 实现了完整的单元测试覆盖各种使用场景
- 验证集合可枚举性、元素类型推导和注册表成员可访问性
- 生成安全的空值检查代码防止运行时异常
- 支持泛型类型约束和复杂继承关系的处理
2026-04-13 20:04:14 +08:00
GeWuYou
812235a243 test(generator): 添加批量注册集合生成器的单元测试
- 添加了针对注解集合生成批处理注册方法的测试用例
- 添加了当集合元素类型无法推断时报告诊断的测试
- 添加了注册方法使用数组参数时的批处理注册测试
- 添加了从继承接口获取注册方法的批处理注册测试
- 添加了从基类获取注册方法的批处理注册测试
- 添加了当集合成员不可实例读取时报告诊断的测试
- 添加了当注册成员不可实例读取时报告诊断的测试
- 添加了当注册方法对所有者类型不可访问时报告诊断的测试
- 添加了当注册导出集合属性参数无效时报告诊断的测试
- 添加了多个分部声明注解时仅生成一个源文件的测试
- 为枚举候选方法功能添加了详细的XML文档注释
2026-04-13 19:39:40 +08:00
GeWuYou
5e1e16f86e feat(generator): 添加对继承层次结构中注册方法的支持
- 实现 EnumerateCandidateMethods 方法以搜索基类和接口中的注册方法
- 修改 AutoRegisterExportedCollectionsGenerator 以支持从继承链中查找兼容的注册方法
- 添加完整的单元测试覆盖继承、接口实现和泛型场景
- 修复静态成员和不可访问方法的诊断报告功能
- 增强源代码生成器对复杂继承结构的支持能力
2026-04-13 19:17:06 +08:00
GeWuYou
e691c9c855 docs(api): 添加 GFramework API 参考文档和源代码生成器文档
- 新增 API 参考文档,包含核心命名空间、常用 API、游戏模块 API、Godot 集成 API
- 详细介绍架构、模型、系统、命令、查询等核心类型及其用法示例
- 添加本地化系统 API 文档,包含管理器、字符串、配置等相关接口
- 新增源代码生成器完整文档,涵盖 Log、Config Schema、ContextAware 等生成器
- 详细说明各生成器的使用方法、配置选项和诊断信息
- 提供完整的 Godot 专用生成器文档,包括 GetNode、BindNodeSignal、AutoUiPage 等
- 添加使用示例和最佳实践指南,展示完整的游戏控制器和枚举状态管理示例
2026-04-13 19:16:28 +08:00
gewuyou
3f237ef32e
Merge pull request #212 from GeWuYou/feat/generator-diagnostics-and-tests
feat(generator): 添加代码生成器诊断规则和测试用例
2026-04-13 15:53:46 +08:00
GeWuYou
6898866b97 feat(generator): 改进自动注册模块生成器的跨文件顺序稳定性
当partial类分布在多个文件中时,确保生成器使用稳定的跨文件顺序来生成注册代码。
添加了对语法树排序的支持,使相同声明上的注册特性能够按照源码中的书写顺序生成安装代码。
同时修复了测试快照换行符问题,确保跨平台兼容性。
2026-04-13 15:47:06 +08:00
GeWuYou
62d448354c feat: 增强生成器属性参数校验与泛型约束支持,完善诊断体系
### 属性参数校验(Attribute Validation)
- AutoUiPageGenerator
  - 新增 GF_AutoBehavior_004 诊断:
    - 检测 AutoUiPageAttribute 参数无效情况
  - 添加测试用例验证错误参数的诊断报告

- AutoRegisterExportedCollectionsGenerator
  - 新增 GF_AutoExport_008 诊断:
    - 检测 RegisterExportedCollectionAttribute 参数无效情况
  - 改进 TryGetRegistrationAttributeArguments 方法:
    - 精确报告错误位置
  - 更新文档以包含新增诊断规则

### 泛型约束支持(Generic Constraints)
- AutoUiPageGenerator / AutoRegisterModuleGenerator
  - 支持以下泛型约束的正确生成:
    - class?
    - notnull
    - unmanaged
  - 添加对应测试用例确保生成正确性

### 诊断体系优化(Diagnostics Improvements)
- AutoRegisterModuleGenerator
  - 重构 AutoRegisterModuleDiagnostics:
    - 优化诊断定义顺序,提高可读性与维护性
2026-04-13 15:13:51 +08:00
GeWuYou
be928718e3 feat: 增强 AutoSceneGenerator 与 AutoRegisterExportedCollectionsGenerator 的验证与安全机制
### AutoSceneGenerator
- 引入保留成员名称集合(GeneratedMemberNames),包含:
  - SceneKeyStr
  - __autoSceneBehavior_Generated
- 实现 ReportGeneratedMemberConflicts 方法:
  - 检测用户定义成员与生成成员冲突
  - 提供清晰的诊断信息
- 在生成流程中集成冲突检测,避免重复成员导致的编译错误

### AutoRegisterExportedCollectionsGenerator
- 增强集合注册生成器的验证逻辑:
  - 新增诊断 GF_AutoExport_006:导出集合成员必须为实例可读成员
  - 新增诊断 GF_AutoExport_007:注册表成员必须为实例可读成员
- 实现 IsInstanceReadableMember 方法:
  - 校验成员为非静态字段或可读属性
- 修复符号访问性检查:
  - 确保注册方法对所有者类型可访问
- 优化生成逻辑:
  - 过滤重复的部分类声明,仅生成一次源码

### Tests
- AutoSceneGenerator
  - 覆盖保留成员冲突场景:
    - SceneKeyStr 冲突
    - __autoSceneBehavior_Generated 冲突

- AutoRegisterExportedCollectionsGenerator
  - 覆盖完整验证逻辑:
    - 不可读成员 → GF_AutoExport_006 / 007
    - 方法不可访问 → GF_AutoExport_003
    - 多个 partial class → 仅生成一个源文件
2026-04-13 13:04:00 +08:00
GeWuYou
3fadba2d79 feat(generator): 添加导出集合自动注册生成器
- 实现了 AutoRegisterExportedCollectionsGenerator 源生成器
- 支持扫描标记了 AutoRegisterExportedCollectionsAttribute 的 partial 类型
- 为使用 RegisterExportedCollectionAttribute 声明的集合成员生成集中注册方法
- 添加了类型验证和诊断报告功能
- 实现了集合元素类型推导和注册方法兼容性检查
- 生成批量注册样板代码以简化手动注册流程
- 添加了完整的单元测试覆盖各种使用场景
2026-04-13 12:27:27 +08:00
GeWuYou
d21fac42b0 feat(generator): 添加 AutoScene 和 AutoRegisterExportedCollections 源代码生成器
- 实现 AutoSceneGenerator 为标记了 [AutoScene] 的 Godot 节点生成场景行为样板
- 实现 AutoRegisterExportedCollectionsGenerator 为导出集合生成批量注册方法
- 添加完整的单元测试覆盖两种源代码生成器的功能和诊断
- 支持泛型类型参数约束的正确生成
- 提供详细的诊断信息帮助用户修复配置错误
2026-04-13 11:25:49 +08:00
GeWuYou
ca1214f47f refactor(generators): 添加通用扩展方法引用
- 在 AutoSceneGenerator 中引入 GFramework.SourceGenerators.Common.Extensions
- 在 AutoRegisterExportedCollectionsGenerator 中引入 GFramework.SourceGenerators.Common.Extensions
2026-04-13 10:59:26 +08:00
GeWuYou
80acf84e95 feat(godot): 添加AutoScene和AutoRegisterExportedCollections源代码生成器
- 实现AutoSceneGenerator为标记了[AutoScene]特性的Godot节点生成场景行为样板代码
- 实现AutoRegisterExportedCollectionsGenerator为导出集合生成批量注册样板方法
- 添加AutoBehaviorDiagnostics和AutoRegisterExportedCollectionsDiagnostics诊断描述符
- 创建AnalyzerReleases.Unshipped.md文件跟踪新的分析器规则
- 添加完整的单元测试覆盖两个生成器的功能和错误情况
- 更新.gitignore文件排除dotnet-home和脚本缓存目录
2026-04-13 10:51:40 +08:00
GeWuYou
eb307bf188 feat(generator): 添加代码生成器诊断规则和测试用例
- 定义了 Godot 源代码生成器的诊断规则表格
- 添加了上下文获取生成器的全面单元测试
- 实现了自动生成行为和注册导出集合的诊断功能
- 配置了全局 using 语句简化代码生成器实现
- 添加了完整的分析器发布跟踪文档记录新规则
2026-04-13 10:01:46 +08:00
gewuyou
83cceed57b
Merge pull request #211 from GeWuYou/feat/yaml-schema-validation
feat(config): 添加YAML配置文件的JSON Schema校验功能
2026-04-12 16:43:56 +08:00
GeWuYou
774b69f560 feat(config): 添加YAML配置文本校验器
- 实现同步和异步YAML文本校验功能
- 添加基于schema文件的配置校验支持
- 实现schema缓存机制避免重复磁盘IO
- 提供配置表名称和文件路径参数验证
- 集成取消令牌支持异步操作取消
- 添加详细的异常处理和诊断信息
2026-04-12 16:09:07 +08:00
GeWuYou
949904b57c docs(Config): 更新YAML配置文本验证器文档
- 为Validate方法添加详细的remarks文档说明同步加载schema的特性
- 为ValidateAsync方法添加cancellation token异常说明和异步加载schema的详细文档
- 补充异步验证方法的I/O密集场景适用性说明
2026-04-12 15:47:43 +08:00
GeWuYou
12e54ce637 feat(config): 添加YAML配置序列化和校验功能
- 实现YamlConfigTextSerializer提供YAML文本序列化功能
- 实现YamlConfigTextValidator提供YAML文本校验功能
- 添加缓存机制优化schema文件加载性能
- 实现同步和异步校验接口支持
- 添加集成测试验证生成配置绑定功能
- 扩展SchemaConfigGenerator支持配置类型生成
- 实现GeneratedConfigConsumerIntegrationTests完整测试覆盖
2026-04-12 15:41:45 +08:00
GeWuYou
7473adb789 feat(config): 添加YAML配置序列化器并更新集成测试
- 新增YamlConfigTextSerializer类提供统一的YAML序列化功能
- 集成测试中添加配置抽象接口引用
- 序列化器使用驼峰命名约定和默认值保留策略
- 自动确保YAML输出以换行符结尾
- 配置对象序列化时验证空值并抛出异常
2026-04-12 14:51:36 +08:00
GeWuYou
e40703c202 feat(config): 添加 YAML 配置文件 JSON Schema 校验器
- 实现了 YAML 配置与 JSON Schema 的运行时校验功能
- 支持嵌套对象、对象数组、标量数组的递归校验
- 集成了 enum 和引用约束的深度校验机制
- 实现了 multipleOf、uniqueItems 等扩展约束规则
- 添加了跨表引用收集和校验能力
- 提供了异步和同步两种加载校验接口
- 支持 minContains/maxContains 数组匹配计数规则
- 实现了 minProperties/maxProperties 对象属性数量校验
- 集成了日期时间、邮箱、URI 等字符串格式校验
- 提供了详细的错误诊断信息和定位功能
2026-04-12 14:28:31 +08:00
GeWuYou
925b6ce2d2 feat(config): 添加YAML配置序列化支持并完善测试依赖
- 集成YamlDotNet库实现YAML配置文件的序列化功能
- 在配置消费者集成测试中添加抽象配置接口引用
- 在YAML配置验证测试中添加抽象配置接口引用
- 统一配置模块的依赖注入和接口抽象层次
2026-04-12 14:09:53 +08:00
GeWuYou
1fac276437 feat(config): 添加YAML配置文件的JSON Schema校验功能
- 实现了YAML配置与JSON Schema的运行时校验能力
- 支持嵌套对象、对象数组、标量数组的递归校验
- 提供async和sync两种模式的schema文件加载解析
- 实现跨表引用的收集与校验机制
- 支持enum枚举值、引用约束和深层约束校验
- 添加了multipleOf、uniqueItems、contains等高级校验功能
- 实现了minProperties、maxProperties对象属性数量校验
- 提供详细的错误诊断信息和路径定位功能
2026-04-12 14:06:06 +08:00
gewuyou
5e9a9de66e
Merge pull request #210 from GeWuYou/docs/config-system-guide
docs(config): 添加游戏内容配置系统完整文档和诊断规则
2026-04-11 16:17:39 +08:00
GeWuYou
809f53e6a0 feat(config): 添加配置验证功能
- 实现配置架构解析器,支持对象、数组和标量类型验证
- 添加 YAML 格式解析和注释提取功能
- 集成数值、布尔值、字符串等基本数据类型验证规则
- 实现日期、邮箱、UUID 等特殊格式验证逻辑
- 添加配置约束验证如最小/最大长度、数值范围等
- 支持正则表达式模式匹配验证
- 提供配置样本生成和批量编辑更新功能
- 实现多语言验证消息本地化支持
- 添加配置字段排序和可编辑性检查功能
- 支持嵌套对象和数组项的路径定位验证
2026-04-11 15:04:22 +08:00
GeWuYou
7c07395825 docs(config): 添加游戏内容配置系统完整文档
- 介绍面向静态游戏内容的 AI-First 配表方案
- 说明 YAML 配置源文件和 JSON Schema 结构描述支持
- 提供推荐目录结构和 Schema 配置示例
- 展示怪物配置和物品配置的 YAML 示例
- 提供完整的接入模板包括 csproj 配置和启动代码
- 介绍官方启动帮助器 GameConfigBootstrap 使用方法
- 说明 Godot 引擎文本配置桥接功能
- 提供运行时读取模板和生成查询辅助功能
- 介绍 Architecture 架构接入模板和热重载配置
- 详述运行时接入方式和注册辅助功能
- 说明运行时校验行为和跨表引用机制
- 提供开发期热重载功能配置指南
- 介绍生成器接入约定和 VS Code 工具支持
- 列出当前功能限制和独立工具评估结论
- 添加配置验证 JavaScript 实现代码
- 实现字符串格式验证和正则表达式校验
- 提供 schema 解析和 YAML 解析功能
- 实现配置字段编辑和注释提取功能
2026-04-11 14:44:00 +08:00
GeWuYou
924d2fd4da docs(config): 添加游戏内容配置系统完整文档和诊断规则
- 新增配置系统详细使用指南,涵盖目录结构、Schema示例、YAML示例
- 添加VS Code插件工具功能说明和推荐接入模板
- 实现配置生成器诊断规则,包括Schema解析、类型检查等错误处理
- 提供运行时加载、热重载、架构集成等完整接入方案
- 添加Godot引擎文本配置桥接和开发期热重载功能说明
2026-04-11 13:24:39 +08:00
gewuyou
5198d1c1c5
Merge pull request #209 from GeWuYou/feat/game-content-config
docs(config): 添加游戏内容配置系统完整文档
2026-04-11 08:55:16 +08:00
GeWuYou
35849f7053 refactor(tests): 移除未使用的 Roslyn 分析器引用
- 从 GlobalUsings.cs 中删除 Microsoft.CodeAnalysis 的全局引用
- 清理测试项目中不再需要的依赖项
2026-04-11 08:52:55 +08:00
GeWuYou
8c8373d844 refactor(config): 更新配置加载器依赖项
- 添加事件抽象依赖项到YAML配置加载器
- 添加YamlDotNet序列化库依赖项
- 为Godot平台配置文件访问添加别名引用
- 在测试文件中添加配置依赖项引用
2026-04-11 08:44:37 +08:00
GeWuYou
0f1319334e docs(config): 添加游戏内容配置系统完整文档
- 新增游戏内容配置系统详细文档,涵盖 YAML 配置、JSON Schema 结构描述
- 添加运行时只读查询、Source Generator 类型生成等功能说明
- 提供推荐目录结构、Schema 示例和 YAML 示例配置
- 添加 VS Code 插件配置浏览、校验和表单编辑功能介绍
- 提供 Godot 文本配置桥接、运行时读取模板和 Architecture 接入指南
- 说明热重载、跨表引用、查询辅助等高级功能使用方法
- 添加开发期工具和当前限制说明,提供完整的配置系统接入流程
2026-04-11 08:41:30 +08:00
GeWuYou
1c064bfe66 fix(config): 解决目录列表加载错误问题
- 添加了 ListDirBegin 方法的错误检查
- 在遇到错误时返回 null 避免异常
- 确保目录遍历前检查操作状态
2026-04-11 07:41:55 +08:00
GeWuYou
abf78aa934 refactor(tests): 重构测试项目的全局引用配置
- 在 GodotYamlConfigLoaderTests 中添加 GFramework.Game.Config 引用
- 从 GodotYamlConfigTableSourceTests 中移除未使用的 System 引用
- 新增 GlobalUsings.cs 文件统一管理所有全局引用
- 将常用的系统命名空间配置为全局引用以减少重复导入
- 优化测试代码的引用管理和项目结构
2026-04-11 07:39:19 +08:00
GeWuYou
aedc30cfd2 refactor(config): 更新Godot YAML配置加载器的文件访问引用
- 将Godot.FileAccess别名为FileAccess以提高代码可读性
- 保持现有功能不变,仅优化命名空间引用方式
2026-04-11 07:37:59 +08:00
GeWuYou
c29c9fe8f4 feat(config): 添加配置表来源安全性验证功能
- 在 GodotYamlConfigLoader 中增加对路径中冒号字符的验证,防止 Windows 无效名称和 ADS 类似语法
- 新增 GodotYamlConfigTableSource 类用于描述配置表来源信息,并实现安全路径验证
- 添加对配置路径和 schema 路径的严格安全检查,拒绝包含根路径、遍历标记或冒号字符的路径
- 扩展测试用例覆盖多种不安全路径场景,包括路径遍历、绝对路径前缀和冒号字符
- 为新功能添加完整的单元测试验证安全路径验证逻辑
2026-04-11 07:37:22 +08:00
GeWuYou
82091be03c refactor(config): 更新Godot YAML配置加载器的文件访问引用
- 将Godot.FileAccess重命名为FileAccess以避免命名冲突
- 优化了配置加载器中的文件操作引用
- 提高了代码的可读性和维护性
2026-04-11 07:36:03 +08:00
GeWuYou
86ff04680b docs(config): 更新 GodotYamlConfigLoader 异步加载方法的文档注释
- 添加了详细的 XML 文档注释说明方法功能和参数
- 补充了异常情况的详细说明包括 ArgumentNullException 和 ConfigLoadException
- 添加了关于运行时缓存同步执行原因的技术备注
- 保留了原有的继承特性标记并添加了完整的文档结构
2026-04-11 07:33:36 +08:00
GeWuYou
1bf5d287e9 fix(config): 修复Godot YAML配置加载器的目录重置异常处理
- 为构造函数添加ArgumentNullException和ArgumentException异常说明
- 为EnableHotReload方法添加InvalidOperationException异常说明
- 重构ResetDirectory方法以捕获目录操作异常并包装为ConfigLoadException
- 添加detail参数到CreateConfigLoadException方法用于提供更详细的错误信息
- 新增单元测试验证运行时缓存目录重置失败时的异常处理
- 添加GodotYamlConfigTableSourceTests测试类验证安全相对路径约束
2026-04-11 07:28:49 +08:00
GeWuYou
e746297496 feat(config): 添加 Godot YAML 配置加载器支持
- 实现 GodotYamlConfigLoader 类,提供 YAML 配置加载适配层
- 支持编辑器态直接读取项目目录和导出态运行时缓存同步
- 添加 GodotYamlConfigEnvironment 抽象处理 Godot 路径和文件访问
- 实现配置文件同步机制,支持 YAML 和 schema 文件复制
- 提供热重载功能,在编辑器态下支持配置实时更新
- 添加完整的单元测试验证各种场景下的配置加载行为
2026-04-11 00:04:29 +08:00
GeWuYou
411d4cb14a docs(config): 添加游戏内容配置系统完整文档
- 新增配置系统概述和核心能力介绍
- 添加Schema和YAML配置文件格式示例
- 提供推荐目录结构和接入模板
- 详细说明Generator集成和运行时加载流程
- 介绍VS Code工具和热重载功能
- 添加Godot引擎桥接适配器文档
- 说明运行时校验行为和错误处理机制
- 提供Architecture模块集成模板
- 记录当前限制和未来规划评估
2026-04-10 23:25:53 +08:00
GeWuYou
0ea3c0ad9d refactor(config): 更新Godot YAML配置加载器的命名空间引用
- 为Godot.FileAccess添加using别名以避免冲突
- 添加GFramework.Game.Config命名空间引用
- 添加NUnit.Framework测试框架引用
- 优化配置加载器的依赖管理
- 提升代码可读性和维护性
- 确保测试类的正确引用关系
2026-04-10 23:10:06 +08:00
GeWuYou
40f5fd34b7 docs(config): 添加游戏内容配置系统完整文档
- 新增面向静态游戏内容的 AI-First 配表方案介绍
- 详细说明 YAML 作为配置源文件和 JSON Schema 结构描述功能
- 提供推荐目录结构和 Schema 示例配置
- 添加 VS Code 插件工具支持说明
- 包含 Godot 文本配置桥接使用指南
- 提供运行时读取和热重载模板示例
- 说明生成器接入约定和运行时校验行为
- 添加开发期热重载和工具支持详细说明
- 创建 Godot 测试项目配置文件
- 实现 GodotYamlConfigLoader 配置加载适配层
2026-04-10 23:05:25 +08:00
gewuyou
39e3ecfe46
Merge pull request #208 from GeWuYou/docs/config-system-complete 2026-04-10 20:42:29 +08:00
GeWuYou
19088fed03 feat(config): 添加配置验证功能模块
- 实现配置架构解析器,支持JSON架构到递归树的转换
- 添加YAML解析器,支持根映射、嵌套对象和数组结构
- 集成配置验证诊断系统,提供架构和YAML内容校验
- 实现批量编辑器字段提取,支持标量类型安全更新
- 添加YAML注释提取功能,映射到逻辑字段路径
- 创建示例配置YAML生成功能,包含架构描述作为注释
- 实现表单更新应用到YAML功能,重写YAML树结构
- 添加标量兼容性检查,支持整数、数字、布尔值和字符串类型
- 实现精确十进制算术运算,用于multipleOf约束验证
- 添加模式匹配验证,支持正则表达式编译和测试
- 实现常量值比较功能,保持与运行时一致的比较格式
- 集成多语言本地化支持,提供中英文验证消息
2026-04-10 20:30:04 +08:00
GeWuYou
b0e8b6ecc5 feat(config): 添加配置验证功能模块
- 实现配置模式解析器,支持对象、数组和标量类型的递归验证
- 添加 YAML 配置文件解析和注释提取功能
- 实现配置值的类型兼容性检查和约束验证
- 添加批量编辑器字段收集和表单更新应用功能
- 实现配置样本生成和多语言本地化支持
- 添加精确十进制算术用于数值约束验证
- 实现配置枚举值和默认值的标准化处理
- 添加配置常量值的可比较键构建功能
2026-04-10 20:21:47 +08:00
GeWuYou
dca304afeb feat(config): 添加配置验证功能模块
- 实现配置架构解析器,支持对象、数组和标量类型的递归验证
- 添加YAML文档解析功能,包括注释提取和路径映射
- 集成配置验证诊断系统,支持多种数据类型约束检查
- 实现批量编辑器的可编辑字段收集功能
- 添加表单更新应用逻辑,支持标量和数组值的安全更新
- 集成数值约束验证,包括最小值、最大值和倍数检查
- 实现字符串长度和正则表达式模式验证
- 添加枚举值匹配和唯一性约束检查
- 实现配置架构注释提取和样本YAML生成功能
- 支持配置架构默认值和常量值处理
2026-04-10 20:09:12 +08:00
GeWuYou
925af56b1c feat(config): 添加配置验证功能
- 实现配置模式解析器,支持对象、数组和标量类型的递归验证
- 添加 YAML 解析和注释提取功能,支持嵌套对象和数组结构
- 实现配置验证诊断,提供详细的错误和警告信息
- 添加表单更新应用功能,支持标量值和数组的批量编辑
- 实现配置示例生成功能,包含描述信息作为 YAML 注释
- 添加数值约束验证,包括最小值、最大值、倍数和长度限制
- 实现枚举值和模式匹配验证,确保数据符合预定义规则
- 添加常量值比较功能,支持对象和数组类型的深度比较
2026-04-10 19:58:42 +08:00
GeWuYou
039ef9817a feat(extension): 添加GFramework配置工具扩展功能
- 实现配置文件浏览器树视图,支持工作区配置目录导航
- 集成轻量级验证系统,支持YAML配置文件语法检查
- 添加模式感知表单预览功能,支持结构化配置编辑
- 实现批量编辑功能,支持跨多个配置文件统一修改字段值
- 集成国际化支持,提供中英文本地化界面
- 添加实时配置文件保存验证,在文件保存时自动校验
- 实现引用导航功能,支持跳转到关联配置表和文件
- 添加工作区变更响应,支持动态刷新配置树视图
2026-04-10 18:52:03 +08:00
GeWuYou
4ff5189da4 docs(config): 添加游戏内容配置系统完整文档与验证工具
- 新增游戏内容配置系统详细文档,涵盖 YAML 配置、JSON Schema 结构、目录组织等
- 添加 Schema 示例和 YAML 示例,展示怪物和物品配置的具体用法
- 提供推荐接入模板,包括目录结构、csproj 配置和启动代码模板
- 添加运行时读取模板和 Architecture 接入模板,简化集成流程
- 实现配置系统运行时校验行为说明,支持多种约束验证
- 添加开发期热重载功能说明和使用方法
- 提供 VS Code 工具支持,包括配置浏览、表单编辑等功能
- 新增配置验证工具实现,支持 JSON Schema 解析和 YAML 验证
- 添加批编辑功能,支持安全更新顶层标量字段和数组
- 提供完整的 API 参考和最佳实践指南
2026-04-10 18:22:40 +08:00
dependabot[bot]
dd004738b3 chore(deps): bump trufflesecurity/trufflehog from 3.94.2 to 3.94.3
Bumps [trufflesecurity/trufflehog](https://github.com/trufflesecurity/trufflehog) from 3.94.2 to 3.94.3.
- [Release notes](https://github.com/trufflesecurity/trufflehog/releases)
- [Commits](https://github.com/trufflesecurity/trufflehog/compare/v3.94.2...v3.94.3)

---
updated-dependencies:
- dependency-name: trufflesecurity/trufflehog
  dependency-version: 3.94.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-10 17:09:01 +08:00
dependabot[bot]
58f362f7eb chore(deps): bump actions/download-artifact from 5 to 8
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 5 to 8.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](https://github.com/actions/download-artifact/compare/v5...v8)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-version: '8'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-10 17:08:46 +08:00
dependabot[bot]
137a9427f9 chore(deps): bump actions/setup-node from 5 to 6
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 5 to 6.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-10 17:08:12 +08:00
dependabot[bot]
41194d5d45 Bump Meziantou.Analyzer from 3.0.43 to 3.0.46
---
updated-dependencies:
- dependency-name: Meziantou.Analyzer
  dependency-version: 3.0.46
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: Meziantou.Analyzer
  dependency-version: 3.0.46
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: Meziantou.Analyzer
  dependency-version: 3.0.46
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: Meziantou.Analyzer
  dependency-version: 3.0.46
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: Meziantou.Analyzer
  dependency-version: 3.0.46
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-10 17:07:17 +08:00
dependabot[bot]
2f782d52f5 Bump Meziantou.Polyfill from 1.0.106 to 1.0.109
---
updated-dependencies:
- dependency-name: Meziantou.Polyfill
  dependency-version: 1.0.109
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: Meziantou.Polyfill
  dependency-version: 1.0.109
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-10 17:06:59 +08:00
dependabot[bot]
396397356c Bump Microsoft.NET.Test.Sdk from 18.3.0 to 18.4.0
---
updated-dependencies:
- dependency-name: Microsoft.NET.Test.Sdk
  dependency-version: 18.4.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: Microsoft.NET.Test.Sdk
  dependency-version: 18.4.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: Microsoft.NET.Test.Sdk
  dependency-version: 18.4.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: Microsoft.NET.Test.Sdk
  dependency-version: 18.4.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: Microsoft.NET.Test.Sdk
  dependency-version: 18.4.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: Microsoft.NET.Test.Sdk
  dependency-version: 18.4.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-10 17:06:35 +08:00
dependabot[bot]
733fd4c7d2 Bump Scriban from 7.0.6 to 7.1.0
---
updated-dependencies:
- dependency-name: Scriban
  dependency-version: 7.1.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-10 17:06:15 +08:00
gewuyou
9f73421532
Merge pull request #207 from GeWuYou/feat/config-system-docs-and-validation
docs(config): 添加游戏内容配置系统完整文档与验证工具实现
2026-04-10 17:04:23 +08:00
GeWuYou
8287bf37fc docs(config): 添加AI代理编码行为规范和配置验证工具测试
- 定义了代码风格、注释规则和文档要求
- 规定了测试覆盖范围和安全编码准则
- 实现了配置模式解析和验证功能
- 添加了常量值比较和枚举校验逻辑
- 集成了数字范围和字符串长度验证
- 支持对象数组和嵌套结构验证
2026-04-10 16:50:39 +08:00
GeWuYou
e28a1e4ecd feat(config): 添加配置验证功能模块
- 实现配置架构解析器,支持JSON架构到递归树的转换
- 添加YAML解析器,支持根映射、缩进嵌套对象和数组结构
- 实现配置验证诊断功能,提供架构和YAML解析验证
- 添加表单更新应用功能,支持将表单更改安全写回YAML
- 实现批编辑器字段提取,支持可编辑标量类型的识别
- 添加配置注释提取功能,将注释映射到逻辑字段路径
- 实现示例配置YAML生成功能,包含架构描述作为注释
- 添加精确十进制算术运算,用于multipleOf约束检查
- 实现标量类型兼容性验证,包括整数、数字、布尔值模式匹配
- 添加常量值元数据处理,支持工具比较对齐运行时行为
2026-04-10 14:33:44 +08:00
GeWuYou
0320404514 docs(config): 添加游戏内容配置系统完整文档与验证工具实现
- 新增游戏内容配置系统详细文档,涵盖 YAML 配置、JSON Schema 结构、目录组织等核心概念
- 实现配置验证工具,支持运行时校验、类型检查、引用验证等功能
- 提供完整的接入模板,包括项目结构、CSProj 配置、启动帮助器等推荐实践
- 集成 VS Code 插件支持,提供配置浏览、表单编辑、递归校验等开发期工具能力
- 实现热重载机制,支持开发期配置文件变更自动刷新运行时表
- 添加详细的 Schema 示例和 YAML 示例,展示怪物、物品等游戏内容配置的实际应用
- 提供 Architecture 接入模板,支持与现有架构的无缝集成
- 实现跨表引用校验,确保配置数据的一致性和完整性
2026-04-10 12:22:20 +08:00
gewuyou
50161a2f28
Merge pull request #206 from GeWuYou/docs/config-system
docs(config): 添加游戏内容配置系统文档与验证工具
2026-04-10 11:14:48 +08:00
GeWuYou
a49c99c528 feat(config): 添加配置验证功能模块
- 实现配置架构解析器,支持对象、数组和标量类型的递归解析
- 添加 YAML 配置文件解析和注释提取功能
- 实现配置验证诊断系统,支持多种数据类型的校验
- 添加表单更新应用功能,支持标量和数组值的批量编辑
- 实现配置示例生成功能,包含架构描述作为 YAML 注释
- 添加国际化支持,提供中英文验证消息本地化
- 实现精确十进制运算,确保数值约束验证的准确性
- 添加批处理数组值解析和枚举值标准化功能
2026-04-10 10:45:22 +08:00
GeWuYou
1a50d7af39 test(config): 添加 YAML 配置加载器单元测试
- 验证 YAML 文件扫描和注册功能
- 测试配置表注册选项对象支持
- 验证空选项对象异常处理
- 测试配置目录不存在时的错误处理
- 验证部分加载失败时的回滚机制
- 测试非法 YAML 文件的错误处理
- 验证 schema 校验功能包括必填字段检查
- 测试类型不匹配的字段校验
- 验证标量 enum 限制校验
- 测试数值范围约束校验包括最小值最大值
- 验证数值特殊约束如 exclusiveMinimum/exclusiveMaximum
- 测试 multipleOf 约束校验
- 验证大数值和科学计数法处理
- 测试字符串长度和正则模式校验
- 验证数组元素数量和唯一性校验
- 测试未知字段检测
- 验证嵌套对象和对象属性数量校验
2026-04-10 10:20:40 +08:00
GeWuYou
7931b41589 feat(config): 添加配置验证和YAML解析功能
- 实现了JSON schema解析器和验证器
- 添加了YAML文档解析和注释提取功能
- 创建了配置验证诊断系统支持中英文本地化
- 实现了批量编辑器可编辑字段收集功能
- 添加了配置文件示例生成功能
- 实现了表单更新应用到YAML的功能
- 添加了精确十进制算术运算支持multipleOf约束检查
- 实现了YAML标量值格式化和引用处理
- 创建了完整的配置验证消息本地化系统
2026-04-10 10:10:47 +08:00
GeWuYou
06d048f38a docs(config): 添加游戏内容配置系统文档与验证工具
- 新增游戏内容配置系统完整文档,包含 YAML 配置、JSON Schema 结构描述
- 添加运行时只读查询、Source Generator 类型生成等功能说明
- 提供推荐目录结构、Schema 示例和 YAML 示例配置模板
- 添加 VS Code 插件工具支持配置浏览、校验和表单编辑功能
- 实现跨表引用校验、热重载及批量编辑等高级特性文档
- 集成 Architecture 模块化接入和运行时校验行为说明
- 添加配置系统限制说明与独立工具评估结论
2026-04-10 09:38:51 +08:00
gewuyou
5722b2a211
Merge pull request #198 from GeWuYou/feat/config-schema-generator-and-validation
Feat/config schema generator and validation
2026-04-09 20:36:44 +08:00
GeWuYou
d263a4360e docs(config): 添加游戏内容配置系统文档和验证工具
- 新增游戏内容配置系统完整文档,涵盖 YAML 配置、JSON Schema 结构、目录组织等
- 实现运行时只读查询、Source Generator 类型生成、VS Code 插件等功能
- 提供配置浏览、raw 编辑、schema 打开、递归校验和嵌套对象表单入口
- 添加配置系统接入模板,包括 csproj 模板、启动帮助器、运行时读取模板
- 实现热重载功能支持开发期配置文件自动刷新
- 提供完整的 schema 示例和 YAML 示例配置
- 添加跨表引用、索引查询辅助、批量编辑等高级功能支持
- 实现配置验证工具,支持类型校验、约束检查、注释提取等特性
2026-04-09 20:26:13 +08:00
GeWuYou
3ec3429857 test(config): 添加YAML配置加载器单元测试
- 验证YAML文件扫描和注册表写入功能
- 测试带schema校验的配置表注册选项对象支持
- 验证空配置表注册选项的异常处理
- 测试配置目录不存在时的错误抛出
- 验证配置表加载失败时注册表状态回滚
- 测试非法YAML文件的反序列化错误处理
- 验证schema校验对必填字段缺失的检查
- 测试schema校验对类型不匹配的检查
- 验证schema校验对枚举值限制的支持
- 测试数值范围约束的校验功能
- 验证数值exclusive min/max约束
- 测试multipleOf约束校验
- 验证大数值和科学计数法支持
- 测试字符串长度和正则模式约束
- 验证数组元素数量和唯一性约束
- 测试未知字段检测和错误处理
- 验证嵌套对象和数组的递归校验
- 测试跨表引用校验功能
2026-04-09 19:58:48 +08:00
GeWuYou
ccb6b5ad42 docs(agents): 添加AI代理行为准则文档
- 定义了环境能力清单和工具选择规则
- 规定了XML文档注释、内联注释和架构级注释要求
- 明确了代码风格包括命名规范、格式化和C#约定
- 设立了测试覆盖范围、组织结构和验证命令标准
- 制定了安全输入验证、依赖管理和权限控制规则
- 确立了文档更新、任务跟踪和审查完成标准
- 更新了浮点数比较算法中的容差计算方式
- 优化了数值精度验证逻辑以避免十进制步进误差
2026-04-09 19:43:15 +08:00
GeWuYou
f9f608ad64 docs(agents): 添加AI代理编码行为规范文档
- 定义了环境能力清单和工具选择规则
- 规定了XML文档注释、内联注释和架构级注释要求
- 明确了代码风格包括命名约定、格式化和C#惯例
- 设立了测试覆盖范围、组织结构和验证命令标准
- 制定了安全规则防止输入验证和敏感数据泄露
- 规范了代码文档、任务跟踪和仓库文档更新流程
- 建立了审查标准确保代码质量和完整性
2026-04-09 19:23:17 +08:00
GeWuYou
16686a0d97 docs(config): 添加游戏内容配置系统文档和验证工具
- 新增游戏内容配置系统完整文档,涵盖 YAML 配置、JSON Schema 结构、目录组织等
- 添加 Schema 示例和 YAML 示例,说明怪物、物品等静态数据配置方式
- 提供推荐接入模板,包括目录结构、csproj 配置和启动代码模板
- 实现官方启动帮助器 GameConfigBootstrap 与 GameConfigModule 集成
- 添加运行时读取模板,提供强类型配置访问入口
- 实现生成查询辅助功能,支持 FindBy* 和 TryFindFirstBy* 查询接口
- 提供 Architecture 推荐接入模板,支持模块化配置管理
- 添加热重载模板,支持开发期配置文件自动刷新
- 实现运行时接入方案,提供只读表形式的配置访问
- 添加运行时校验行为说明,支持跨表引用和数据完整性检查
- 实现开发期热重载功能,支持配置变更自动重载
- 添加生成器接入约定,自动生成配置类型和表包装代码
- 提供 VS Code 工具支持,包括配置浏览、表单编辑和批量更新功能
- 实现配置验证工具,支持 JSON Schema 子集解析和 YAML 校验功能
2026-04-09 19:23:06 +08:00
GeWuYou
f5317eda01 docs(config): 添加游戏内容配置系统文档
- 介绍面向静态游戏内容的 AI-First 配表方案
- 详细说明 YAML 配置源文件和 JSON Schema 结构描述功能
- 提供推荐目录结构和 Schema 示例配置指南
- 说明 VS Code 插件提供的配置浏览和编辑功能
- 提供运行时接入模板和强类型查询辅助使用方法
- 说明跨表引用和运行时校验行为规范
- 介绍开发期热重载功能和性能优化建议
- 说明当前限制和独立 Config Studio 评估结论
2026-04-09 17:07:29 +08:00
GeWuYou
51de7f1102 feat(config): 添加配置验证和YAML解析功能
- 实现了配置模式解析器,支持递归对象/数组/标量树结构
- 添加了可编辑字段收集功能,支持批量编辑标量和数组类型
- 实现了YAML解析器,支持嵌套对象、标量数组和对象数组
- 添加了YAML注释提取功能,将注释映射到逻辑字段路径
- 实现了基于模式的示例YAML配置生成功能
- 添加了扩展端验证诊断功能,支持中英文错误消息
- 实现了表单更新应用功能,支持标量、数组和对象数组更新
- 添加了批处理数组值解析和模式枚举值标准化功能
- 实现了YAML标量格式化和引号移除功能
- 添加了完整的模式节点验证,支持数值约束、长度限制和模式匹配
- 实现了多语言验证消息本地化功能
- 添加了YAML标记化和块解析功能
- 实现了唯一性检查和比较键构建功能
2026-04-09 17:06:43 +08:00
GeWuYou
c693337ebf feat(config): 添加基于JSON schema的配置生成器
- 实现了SchemaConfigGenerator源代码生成器
- 支持根据JSON schema文件自动生成配置类型
- 生成强类型的配置表包装类
- 支持嵌套对象和对象数组的类型生成
- 生成配置表的查询和索引功能
- 添加了跨表引用的元数据支持
- 生成运行时注册和访问辅助代码
- 支持默认值、枚举和约束的文档生成
2026-04-09 17:06:20 +08:00
gewuyou
73d2577fe1
Merge pull request #197 from GeWuYou/feat/config-module-architecture-integration
feat(config): 添加配置模块集成测试和架构模块支持
2026-04-09 16:44:35 +08:00
GeWuYou
febf948077 feat(config): 添加架构配置集成测试和模块实现
- 实现了 ArchitectureConfigIntegrationTests 测试类,验证配置模块在架构场景下的完整链路
- 添加了 GameConfigModule 类,提供基于 Architecture 的配置模块接入入口
- 实现了配置模块的生命周期管理,包括首次加载和热重载支持
- 集成了 BootstrapInitializationHook 确保配置在 utility 初始化前完成加载
- 添加了模块复用限制和安装窗口验证机制
- 实现了架构销毁时的资源清理和生命周期钩子注册
2026-04-09 16:33:02 +08:00
GeWuYou
eb7a8c702c docs(tests): 为配置集成测试添加详细的XML文档注释
- 为ConsumerArchitecture构造函数添加参数验证和功能说明文档
- 为ConfigModule属性添加配置模块获取方法的详细说明
- 为Registry属性添加配置注册表访问的生命周期状态说明
- 为MonsterTable属性添加怪物配置表读取的异常处理和使用约束
- 为ProbeUtility属性添加配置可见性探针的功能说明
- 为ModuleOnlyArchitecture类添加模块共享测试的相关文档
- 为配置模块和注册表属性添加生命周期状态和使用时机说明
2026-04-09 15:15:10 +08:00
GeWuYou
13c91c8869 feat(config): 添加配置模块架构集成与YAML加载器
- 实现 GameConfigBootstrap 启动帮助器,统一管理配置注册表、YAML加载器与热重载句柄
- 创建 GameConfigModule 配置模块,集成到 Architecture 生命周期中完成自动加载与资源回收
- 实现 YamlConfigLoader 基于文件目录的YAML配置加载器,支持批量加载与热重载功能
- 添加 ArchitectureConfigIntegrationTests 集成测试,验证模块安装、加载顺序与表访问
- 实现热重载防抖机制,支持开发期配置变更监听与增量更新
- 提供同步上下文桥接支持,避免Unity主线程或UI线程上的死锁问题
2026-04-09 14:48:05 +08:00
GeWuYou
f290050262 feat(config): 添加配置模块集成测试和架构模块支持
- 新增 ArchitectureConfigIntegrationTests 验证配置模块在架构场景下的接入链路
- 添加 GameConfigModule 作为 Architecture 官方配置模块接入入口
- 实现模块生命周期管理,统一完成注册表暴露和首次加载
- 添加配置模块防止重复安装到多个架构的保护机制
- 验证配置模块在其他 utility 初始化前完成首次加载的顺序
- 更新中文文档详细说明配置系统接入模板和架构集成方式

 Conflicts:
	docs/zh-CN/game/config-system.md
2026-04-09 12:44:28 +08:00
gewuyou
55a51fb5d2
Merge pull request #196 from GeWuYou/feat/add-game-content-configuration-documentation
refactor: 重构配置目录API并新增诊断查询方法
2026-04-09 10:18:17 +08:00
GeWuYou
fac2453766 docs(config): 添加游戏内容配置系统完整文档与集成测试
- 新增游戏内容配置系统完整使用文档,涵盖 YAML 配置、JSON Schema 结构、目录组织等
- 添加推荐的项目接入模板,包括目录结构、csproj 配置、启动帮助器和运行时读取入口
- 实现官方启动帮助器 GameConfigBootstrap 与 GameConfigBootstrapOptions 集成
- 添加强类型配置表访问、查询辅助和跨表引用功能说明
- 实现开发期热重载、运行时校验和 VS Code 工具集成指南
- 添加完整的单元测试验证生成器绑定、聚合注册和强类型访问功能
- 提供 Architecture 接入模板和热重载管理最佳实践
- 包含运行时校验行为、诊断对象和配置加载异常处理说明
2026-04-09 10:01:32 +08:00
GeWuYou
5190ba2359 docs(game): 添加游戏内容配置系统详细文档
- 新增游戏内容配置系统完整文档,涵盖 YAML 配置、JSON Schema 结构、目录组织等
- 添加 Schema 示例和 YAML 示例,展示怪物和物品配置的具体格式
- 提供推荐接入模板,包括目录结构、csproj 配置、启动帮助器和运行时读取模板
- 完善运行时接入说明,介绍配置加载、注册和访问的完整流程
- 增加热重载功能说明,提供开发期自动刷新配置的实现方式
- 补充 VS Code 工具支持说明,提供配置浏览、编辑和校验功能介绍
- 添加生成器接入约定和当前限制说明,确保开发者了解系统边界
- 生成项目级配置目录和注册扩展方法,简化多表注册流程
2026-04-09 09:33:08 +08:00
gewuyou
015cac6eb5
Merge pull request #195 from GeWuYou/feat/game-config-system
feat(config): 实现x-gframework-index索引元数据支持
2026-04-08 12:48:39 +08:00
GeWuYou
017179466d feat(config): 添加配置架构生成器和怪物表自动生成
- 实现 SchemaConfigGenerator 源代码生成器
- 自动生成 MonsterTable 配置表包装类
- 支持基于 JSON schema 的类型安全配置访问
- 生成配置表的精确匹配索引查找功能
- 实现懒加载的只读字典索引结构
- 添加配置实体的运行时注册和访问辅助方法
2026-04-08 12:33:12 +08:00
GeWuYou
031d0d1e11 docs(Config): 更新 SchemaConfigGenerator 文档注释
- 添加 isDirectChildOfRoot 参数的文档说明
2026-04-08 12:18:28 +08:00
GeWuYou
9b13985615 feat(generator): 添加配置架构代码生成器功能
- 实现 SchemaConfigGenerator 源代码生成器
- 支持从 JSON schema 文件生成配置类型和配置表包装类
- 生成强类型的 MonsterTable 配置表包装器
- 实现基于属性名称的查找索引构建功能
- 提供自动生成的 FindByName 和 TryFindFirstByName 方法
- 支持配置表的精确匹配查询操作
- 生成配置绑定辅助类和元数据常量
- 实现跨表引用关系的元数据提取功能
2026-04-08 11:14:58 +08:00
GeWuYou
43b95c7513 docs(config): 添加游戏内容配置系统完整文档
- 新增配置系统架构说明,涵盖 YAML 源文件、JSON Schema 结构描述、运行时只读查询等核心功能
- 完善推荐目录结构和 Schema 示例,包括怪物、物品配置表的标准定义方式
- 提供完整的接入模板,包含 csproj 配置、GameConfigHost 生命周期管理、GameConfigRuntime 读取入口
- 添加运行时校验行为说明,支持必填字段、类型匹配、数值范围、字符串长度、正则表达式、数组长度等多种约束
- 集成跨表引用功能,支持通过 x-gframework-ref-table 声明关联关系并进行有效性检查
- 添加开发期热重载支持,可自动监听配置目录和 schema 文件变更并重载对应表格
- 提供 VS Code 工具集成说明,包括配置浏览、raw 编辑、schema 打开、表单入口等功能
- 补充生成器接入约定,从 *.schema.json 自动生成配置类型、表包装、注册辅助等代码
- 添加完整的 Analyzer 规则文档,涵盖 GF_ConfigSchema_001 到 GF_ConfigSchema_008 等错误诊断码
- 增加单元测试验证,确保消费者项目可以正常使用生成的聚合注册辅助和强类型访问入口
2026-04-08 09:32:00 +08:00
gewuyou
3109beaa9b
Merge pull request #194 from GeWuYou/feat/docs-init-vitepress-config
feat(docs): 初始化 GFramework 文档网站配置
2026-04-07 14:34:30 +08:00
GeWuYou
ff4f92c6d7 feat(docs): 初始化 GFramework 文档网站配置
- 添加 VitePress 主题样式文件,自定义颜色、按钮、首页、自定义块等组件样式
- 配置深蓝色品牌色彩方案,包括文字、悬停和背景色
- 实现首页英雄区域渐变效果和响应式图像模糊滤镜
- 集成本地搜索功能,支持中文界面翻译和搜索提示
- 创建安全泛型转义插件,防止 Markdown 中的尖括号被误解析
- 设置多语言导航菜单,包含入门指南、Core、Game、Godot 等模块链接
- 构建完整的侧边栏结构,覆盖核心框架、游戏模块、源码生成器等所有功能区域
- 配置教程、最佳实践、API参考等学习资源分类
- 添加页脚版权信息、社交链接和返回顶部功能
- 优化移动端和桌面端的搜索框显示适配
2026-04-07 14:03:01 +08:00
gewuyou
d645e8a338
Merge pull request #193 from GeWuYou/chore/coderabbit-balanced-to-chill
chore(config): 调整 CodeRabbit 配置以简化审查设置
2026-04-07 12:54:34 +08:00
GeWuYou
ade735ed4a feat(config): 添加 GitHub Checks 工具配置
- 在 .coderabbit.yaml 中新增 tools 配置块
- 启用 github-checks 工具
- 设置 github-checks 超时时间为 90 秒
- 保留原有的 auto_review 配置设置
2026-04-07 12:50:08 +08:00
GeWuYou
ed6c13f151 chore(config): 调整 CodeRabbit 配置以简化审查设置
- 将审查配置文件从 balanced 更改为 chill 以降低严格度
- 移除 github-checks 工具配置
- 保持自动审查功能启用状态
- 维持现有的请求更改工作流程和摘要设置
2026-04-07 12:49:32 +08:00
gewuyou
b3e484632d
Merge pull request #191 from GeWuYou/feat/config-system-with-source-generator
feat(config): 添加游戏内容配置系统及源代码生成器
2026-04-07 09:18:28 +08:00
GeWuYou
0564428d69 chore(config): 更新 CodeRabbit 配置以优化代码审查设置
- 添加 YAML 语言服务器 schema 指定
- 设置语言为简体中文
- 配置审查参数包括高阶总结、状态展示及详细问题显示
- 开启请求修改工作流
- 配置工具与 GitHub 检查功能
- 设置超时时间为 90 秒
- 启用自动审查并排除草稿 PR
- 开启聊天自动回复功能
2026-04-07 08:59:28 +08:00
GeWuYou
ca82b2701c feat(config): 添加游戏内容配置系统及源代码生成器
- 实现基于 YAML 的静态游戏内容配置管理
- 集成 JSON Schema 结构描述与校验功能
- 提供一对象一文件的目录组织方式
- 支持运行时只读查询与类型安全访问
- 添加 Source Generator 自动生成配置类型和表包装
- 实现 VS Code 插件提供配置浏览与编辑功能
- 添加热重载支持开发期实时配置更新
- 提供官方启动帮助器简化初始化流程
- 支持跨表引用校验与关联表联动重载
- 实现强类型查询辅助方法提升开发效率
2026-04-07 08:38:06 +08:00
gewuyou
d120236e13
Merge pull request #190 from GeWuYou/feat/config-system-integration
Feat/config system integration
2026-04-06 23:01:14 +08:00
GeWuYou
d99af1cfac docs(game): 添加游戏内容配置系统文档
- 介绍面向静态游戏内容的 AI-First 配表方案
- 详细说明 YAML 配置源文件和 JSON Schema 结构描述功能
- 提供推荐的目录结构和完整的 Schema 与 YAML 示例
- 包含配置系统的接入模板和运行时读取方法
- 说明开发期热重载功能和 VS Code 工具集成
- 记录当前限制和独立 Config Studio 评估结论
- 提供 Architecture 推荐接入模板和热重载配置方法
2026-04-06 22:39:37 +08:00
GeWuYou
cd32a006c6 fix(tests): 修正配置加载器参数名称断言
- 将断言中的参数名从 "ConfigureLoader" 更新为 "options"
- 确保测试用例与实际实现保持一致
2026-04-06 22:15:30 +08:00
GeWuYou
bba589a853 docs(config): 添加游戏内容配置系统完整文档
- 新增 CI/CD 工作流配置文件,集成代码质量检查、安全扫描和构建测试
- 详细介绍配置系统架构,包括 YAML 源文件、JSON Schema 结构描述和运行时只读查询
- 提供完整的目录结构推荐和 Schema/JSON 示例配置
- 包含项目接入模板,涵盖 csproj 配置、启动帮助器和运行时读取模板
- 说明运行时校验行为,支持必填字段、类型匹配、数值范围等校验规则
- 介绍开发期热重载功能,支持配置文件变更自动刷新
- 详述生成器接入约定,包括配置类型、表包装和注册辅助生成
- 提供 VS Code 工具使用指南,支持配置浏览、表单编辑和批量操作
- 说明当前系统限制和未来发展规划,明确适用场景
2026-04-06 21:19:49 +08:00
GeWuYou
c732285dfb docs(config): 添加游戏内容配置系统文档和验证工具
- 新增游戏内容配置系统完整文档,涵盖 YAML 配置、JSON Schema 结构、目录组织
- 实现配置系统的运行时查询、类型生成、VS Code 插件集成等功能说明
- 添加 Schema 示例、YAML 示例和推荐接入模板
- 提供运行时读取、热重载、批处理编辑等功能的使用指南
- 实现配置校验行为、跨表引用、诊断对象等核心功能文档
- 集成开发期工具支持,包括表单编辑、批量更新、注释渲染等能力
- 添加架构接入模板和生产部署相关建议
2026-04-06 20:17:57 +08:00
GeWuYou
67149ab2b2 feat(config): 添加配置系统集成测试和官方启动帮助器
- 添加 ArchitectureConfigIntegrationTests 验证架构初始化流程中配置加载
- 实现 GameConfigBootstrap 收敛配置注册、加载与热重载生命周期管理
- 提供 GameConfigBootstrapOptions 配置启动约定选项对象
- 添加 GameConfigBootstrapTests 验证启动帮助器功能完整性
- 更新中文文档详述配置系统接入模板和最佳实践
- 提供 Architecture 推荐接入模板简化框架集成步骤
- 实现热重载支持和错误诊断机制提升开发体验
2026-04-06 18:41:05 +08:00
gewuyou
a76630ad16
Merge pull request #189 from GeWuYou/feat/config-system-integration
feat(config): 添加配置系统集成测试和文档
2026-04-06 17:58:42 +08:00
GeWuYou
975f556ab0 docs(config): 添加AI代理编码规范和配置系统集成测试
- 创建AGENTS.md文档定义AI代理编码行为规则
- 包含环境能力清单、注释规则、代码风格要求
- 定义测试要求、安全规则和文档规范
- 添加端到端集成测试验证生成配置消费者功能
- 实现跨域配置表加载和强类型访问验证
- 添加按域、表名和自定义谓词过滤注册支持
- 提供完整的测试验证命令和执行期望说明
2026-04-06 17:24:04 +08:00
GeWuYou
92eb365dc7 feat(config): 添加配置系统集成测试和文档
- 添加 ArchitectureConfigIntegrationTests 验证架构初始化流程中配置加载
- 添加 GeneratedConfigConsumerIntegrationTests 测试消费者项目配置绑定功能
- 添加完整的游戏内容配置系统中文文档
- 添加生成配置目录和注册选项支持批量表注册与筛选
- 实现配置架构集成模板和热重载功能
- 添加跨表引用校验和运行时诊断功能
- 实现 VS Code 工具支持配置浏览和表单编辑
- 添加查询辅助方法支持按字段快速检索配置数据
2026-04-06 16:38:42 +08:00
gewuyou
e9e04d9792
Merge pull request #188 from GeWuYou/feat/game-content-config-system
docs(config): 添加游戏内容配置系统文档和集成测试
2026-04-06 16:03:56 +08:00
GeWuYou
4f966f9f50 docs(game): 添加游戏内容配置系统文档和生成器功能
- 添加了 AI-First 配置系统完整文档,涵盖 YAML 配置、JSON Schema 结构、目录组织
- 实现了 Source Generator 自动生成配置类型、表包装、单表注册和访问辅助代码
- 提供了项目级聚合注册目录和配置浏览、校验、表单编辑等工具支持
- 集成了运行时只读查询、热重载、跨表引用校验等核心功能
- 添加了 VS Code 插件支持配置浏览、raw 编辑、schema 打开和递归校验功能
2026-04-06 15:55:58 +08:00
GeWuYou
83c0c57f10 docs(config): 添加游戏内容配置系统文档和集成测试
- 新增架构配置集成测试验证 YAML 配置加载功能
- 添加消费者项目配置生成器集成测试
- 创建完整的游戏内容配置系统中文文档
- 文档涵盖目录结构、Schema 示例、接入模板和运行时校验行为
- 提供 Architecture 推荐接入模板和热重载配置说明
- 完善 VS Code 工具功能介绍和当前限制说明
2026-04-06 15:17:33 +08:00
gewuyou
f0064e31aa
Merge pull request #187 from GeWuYou/feat/data-repository-persistence
docs(data): 添加数据与存档系统文档并实现数据仓库功能
2026-04-06 13:01:31 +08:00
GeWuYou
60526a8a98 docs(game): 添加数据与存档系统文档和持久化测试
- 新增数据与存档系统完整文档,包含核心概念、基本用法和高级功能
- 实现文件存储、槽位存档仓库和统一设置仓库的持久化行为测试
- 覆盖存档迁移、备份恢复、批量操作等关键功能的测试用例
- 添加数据版本控制和自动备份机制的详细说明
- 提供完整的 API 接口文档和使用示例代码
2026-04-06 12:52:06 +08:00
gewuyou
77f67c8a9c
Merge pull request #186 from GeWuYou/feat/add-game-content-config-with-source-generator
docs(config): 添加游戏内容配置系统文档和集成测试
2026-04-06 12:40:32 +08:00
GeWuYou
7fad6772e0 feat(generator): 添加配置架构集成测试和JSON模式配置生成器
- 添加 ArchitectureConfigIntegrationTests 测试验证配置注册表初始化功能
- 实现 SchemaConfigGenerator 源代码生成器解析JSON schema文件
- 生成配置类型类、配置表包装器和运行时绑定辅助代码
- 支持嵌套对象、对象数组、标量数组的类型安全访问
- 提供强类型的配置表查询方法如 FindByProperty 等
- 实现跨表引用元数据生成和验证机制
2026-04-06 12:25:11 +08:00
GeWuYou
7114a76377 docs(data): 添加数据与存档系统文档并实现数据仓库功能
- 新增数据与存档系统详细文档,涵盖核心概念和使用方法
- 实现 DataRepository 类提供统一数据持久化接口
- 添加 DataRepositoryOptions 配置选项支持备份和事件功能
- 实现完整的数据仓库测试用例验证持久化行为
- 支持多槽位存档管理和版本化数据迁移功能
- 提供批量数据操作和事件通知机制
- 实现自动备份功能防止数据丢失
- 支持聚合设置仓库统一管理多个配置项
2026-04-06 12:21:28 +08:00
GeWuYou
2b30e859e9 docs(config): 添加游戏内容配置系统文档和集成测试
- 新增游戏内容配置系统完整文档,包含 YAML 配置、JSON Schema 结构描述
- 添加推荐目录结构和配置示例,支持怪物、物品、技能等静态内容管理
- 实现 Source Generator 自动生成配置类型、表包装和注册访问辅助功能
- 集成 VS Code 插件提供配置浏览、raw 编辑、schema 打开和校验功能
- 添加生成查询辅助,为顶层标量字段生成 FindBy* 与 TryFindFirstBy* 方法
- 实现开发期热重载功能,支持配置文件修改后自动刷新运行时表
- 添加跨表引用校验,支持 x-gframework-ref-table 声明的引用关系检查
- 新增集成测试验证生成器自动拾取 schema 并支持强类型访问入口
- 添加 IsExternalInit 类型支持低版本 .NET 框架的 init-only setter 功能
2026-04-06 11:42:34 +08:00
gewuyou
fb3bf49a12
Merge pull request #185 from GeWuYou/feat/game-save-data-system
feat(game): 添加数据与存档系统核心功能
2026-04-06 11:39:17 +08:00
GeWuYou
25e4965817 feat(game): 添加存档仓库实现和持久化测试
- 实现基于槽位的存档仓库功能,支持存档的保存、加载、删除和列举操作
- 添加存档版本迁移机制,支持自动升级旧版本存档数据
- 实现文件存储和统一设置仓库的基础持久化功能
- 添加完整的单元测试覆盖存档仓库的各种使用场景
- 创建测试工具类和测试数据模型用于验证持久化行为
- 添加项目AI代理行为规范文档,确保代码质量和一致性
2026-04-06 11:33:35 +08:00
GeWuYou
7ad80f54d3 feat(game): 添加数据与存档系统核心功能
- 实现 ISaveRepository<T> 接口提供存档管理功能
- 添加 SaveRepository<T> 实现类支持槽位存档管理
- 实现数据版本迁移机制支持存档版本升级
- 添加完整的存档测试用例验证功能正确性
- 创建数据与存档系统中文文档说明使用方法
- 移除项目中不再需要的本地计划文件夹配置
2026-04-06 11:09:53 +08:00
gewuyou
397611d47c
Merge pull request #184 from GeWuYou/docs/godot-architecture-and-patterns
docs(godot): add architecture integration and design pattern docs
2026-04-06 10:19:13 +08:00
GeWuYou
aab0995f49 docs(godot): add architecture integration and design pattern docs
- Add documentation for Godot architecture integration, including AbstractArchitecture,
  ArchitectureAnchor, and IGodotModule
- Describe basic usage: architecture creation, initialization, and anchor usage
- Provide advanced examples: module system, lifecycle hooks, and hot-reload support
- Document ContextAware usage for accessing architecture within nodes
- Include best practices for multi-architecture setups and common pitfalls
- Add architecture design patterns guide (MVC, MVVM, Command, etc.)
- Cover event-driven, DI, and service locator patterns with examples

Note:
- Normalize line endings to LF to fix inconsistent diffs caused by CRLF/LF mismatch
- No functional code changes
2026-04-06 10:12:59 +08:00
gewuyou
c62893d0c2
Merge pull request #183 from GeWuYou/chore/add-editorconfig-gitattributes
chore(config): 添加编辑器配置和 Git 属性设置
2026-04-06 09:47:02 +08:00
GeWuYou
5a1232274e chore(config): 添加编辑器配置和 Git 属性设置
- 配置 .editorconfig 文件统一代码风格
- 设置 UTF-8 编码和 LF 行尾
- 为解决方案文件和批处理脚本配置 CRLF 行尾
- 配置 .gitattributes 统一文本文件行尾规范化
- 设置二进制文件不进行行尾转换
- 指定各类源码文件使用 LF 行尾
2026-04-06 09:41:42 +08:00
gewuyou
e513ecc284
Merge pull request #174 from GeWuYou/feat/architecture-base-and-bootstrapper
Feat/architecture base and bootstrapper
2026-04-06 08:44:14 +08:00
GeWuYou
e3ea364b29 docs(core): 添加架构详解和核心框架文档
- 新增 Architecture 架构详解文档,涵盖设计目标、核心组件、生命周期管理
- 添加 GFramework.Core 核心框架文档,包含五层架构、快速开始、组件联动等内容
- 新增架构组件激活器实现,支持类型注册路径的实例创建能力
- 添加架构销毁器,统一处理可销毁对象的登记与释放
- 实现架构生命周期管理器,负责阶段转换和组件初始化销毁
2026-04-06 08:33:56 +08:00
gewuyou
6f17e2c437
Merge pull request #175 from GeWuYou/feat/ai-first-config-system
Feat/ai first config system
2026-04-06 07:59:48 +08:00
GeWuYou
7da35c00b2 feat(config): 添加基于文件目录的YAML配置加载器
- 实现YamlConfigLoader类,支持从文件目录加载YAML配置
- 提供RegisterTable方法注册配置表定义,支持schema校验
- 添加LoadAsync异步加载功能,支持批量加载配置表
- 实现EnableHotReload方法,支持开发期配置热重载
- 添加跨表引用校验功能,确保配置依赖关系正确性
- 支持YAML文件和YML文件格式,自动识别文件扩展名
- 提供配置表主键提取器和比较器自定义功能
- 实现文件变更监听和防抖机制,避免频繁重载
- 支持配置目录和schema文件路径的灵活配置
- 提供详细的加载异常信息和诊断支持
2026-04-06 07:53:46 +08:00
GeWuYou
a416e093ee feat(config): 添加基于YAML的配置加载器实现
- 实现YamlConfigLoader类,支持从文件目录加载YAML配置
- 提供RegisterTable方法支持配置表定义注册
- 实现热重载功能,监听文件变更并自动重新加载
- 支持schema校验,拒绝未知字段和类型错误
- 实现跨表引用校验,确保配置一致性
- 添加YamlConfigTableRegistrationOptions选项类
- 支持防抖机制避免频繁重载
- 提供详细的错误诊断信息
2026-04-06 07:37:59 +08:00
gewuyou
e67cfd4808
Merge pull request #176 from GeWuYou/feat/coroutine-core-and-godot-integration
Feat/coroutine core and godot integration
2026-04-06 07:23:05 +08:00
GeWuYou
d21370787b test(godot): 添加Godot测试项目并配置CI流水线
- 在CI工作流中添加GFramework.Godot.Tests项目的测试执行
- 配置dotnet test命令运行Godot测试套件
- 添加TRX格式的日志输出和测试结果目录设置
- 更新Godot模块的全局引用配置
- 在Timing.cs中添加必要的命名空间引用
- 在GodotTimeSourceTests.cs中添加NUnit框架引用
2026-04-06 00:37:32 +08:00
GeWuYou
2053451185 feat(coroutine): 添加协程调度器和相关功能实现
- 实现了 CoroutineScheduler 类,支持协程的运行、暂停、恢复和终止管理
- 添加了协程槽位管理机制 CoroutineSlot,用于跟踪单个协程状态
- 实现了协程的优先级、标签和分组功能,支持批量操作
- 集成了等待指令系统,包括 WaitForSecondsRealtime、WaitForFixedUpdate 等
- 添加了协程统计功能和异常处理机制
- 实现了 Godot 平台的时间源适配器 GodotTimeSource
- 创建了协程调度器的高级功能测试用例
- 添加了 Timing 节点用于在 Godot 引擎中管理协程生命周期
2026-04-06 00:33:37 +08:00
gewuyou
c4f5d502b3
Merge pull request #182 from GeWuYou/chore/ci-github-checks-config
chore(ci): 配置 GitHub Checks 工具
2026-04-05 23:30:21 +08:00
GeWuYou
621bba9b09 chore(ci): 配置 GitHub Checks 工具
- 启用 GitHub Checks 功能
- 设置超时时间为 90000 毫秒
- 添加 reviews 配置项
- 配置 github-checks 工具选项
2026-04-05 23:26:37 +08:00
gewuyou
dcb9aa229a
Merge pull request #180 from GeWuYou/feat/data-unified-settings-repository
Feat/data unified settings repository
2026-04-05 23:12:29 +08:00
GeWuYou
d2533de3be test(serializer): 添加JSON序列化器单元测试并优化反序列化异常处理
- 添加了完整的JsonSerializer单元测试覆盖序列化和反序列化场景
- 优化了反序列化方法中的异常处理逻辑,改进错误信息
- 修改了DeserializeCore方法中未使用的参数命名
- 添加了对各种边界情况的测试验证,包括无效JSON和空值处理
2026-04-05 22:58:45 +08:00
GeWuYou
3d86cdb093 docs(setting): 添加设置系统文档并实现JSON序列化器
- 新增设置系统详细文档,包含核心概念、接口定义和基本用法
- 实现JSON序列化器支持对象序列化和反序列化功能
- 添加序列化器单元测试验证序列化功能正确性
- 提供自定义转换器支持和错误处理机制
2026-04-05 22:26:07 +08:00
GeWuYou
a5d18e4eca docs(game): 添加数据与存档系统及GFramework.Game模块文档
- 创建数据与存档系统文档,介绍IData、IDataRepository、ISaveRepository等核心接口
- 添加基本用法示例,包括数据类型定义、存档仓库使用和配置注册
- 提供高级用法指南,涵盖自动保存、数据版本迁移和批量数据操作
- 实现存档备份和恢复功能示例
- 整理数据与存档系统最佳实践和常见问题解答
- 创建GFramework.Game模块总览文档,介绍游戏特定功能抽象
- 添加架构模块系统说明,包含AbstractModule基础使用和复杂模块示例
- 实现资产管理章节,介绍AbstractAssetCatalogUtility和资产映射系统
- 提供存储系统详解,包括ScopedStorage分层存储和自定义存储实现
- 添加序列化系统文档,涵盖JsonSerializer使用和自定义转换器
- 整理完整的游戏数据管理系统使用示例
2026-04-05 21:40:54 +08:00
GeWuYou
21b4c826d4 feat(data): 添加统一设置数据仓库和JSON序列化器实现
- 实现UnifiedSettingsDataRepository统一管理所有设置数据
- 添加JsonSerializer基于Newtonsoft.Json的序列化功能
- 创建SettingsModel管理设置数据生命周期和迁移
- 添加完整的单元测试验证持久化功能
- 实现数据类型注册和批量保存加载功能
- 支持设置数据的版本迁移和事件通知机制
2026-04-05 21:40:28 +08:00
gewuyou
46ea6f1ffd
Merge pull request #179 from GeWuYou/feat/ci-publish-workflow-nuget-github
feat(workflow): 添加许可证合规检查工作流并优化发布流程
2026-04-05 20:54:45 +08:00
GeWuYou
cd210da167 feat(workflow): 添加许可证合规检查工作流并优化发布流程
- 新增 license-compliance.yml 工作流,集成 Feluda 许可证扫描器
- 实现许可证合规性检查、SBOM 生成和验证功能
- 移除 publish.yml 中的许可证合规相关步骤
- 更新发布流程以分离许可证合规和包发布职责
- 添加并发控制配置避免重复执行
- 简化 GitHub Release 创建流程,移除合规文件附件逻辑
2026-04-05 20:42:00 +08:00
gewuyou
152da3fe3f
Merge pull request #177 from GeWuYou/feat/ci-publish-workflow-nuget-github
feat(ci): 添加发布工作流支持NuGet和GitHub Packages
2026-04-05 20:28:46 +08:00
GeWuYou
1e092c07d3 chore(ci): 更新发布工作流配置
- 添加 .NET 10.0 环境设置步骤
- 将密码参数从 secrets.GITHUB_TOKEN 替换为 github.token
- 将环境变量中的 secrets.GITHUB_TOKEN 替换为 github.token
2026-04-05 20:23:16 +08:00
gewuyou
658a36fdd0
Merge pull request #178 from GeWuYou/feat/godot-localization-settings
Feat/godot localization settings
2026-04-05 20:21:10 +08:00
GeWuYou
e84af1512d feat(setting): 添加本地化设置测试并优化依赖注入
- 在 GodotLocalizationSettingsTests 中添加核心本地化接口引用
- 为 GodotLocalizationSettings 添加架构依赖项
- 配置 Godot 全局命名空间以便更简单的 API 访问
- 更新测试文件中的设置数据抽象层依赖项
- 简化 Godot 项目中的全局 using 指令结构
2026-04-05 20:08:28 +08:00
GeWuYou
d588372cff docs(godot): 添加 Godot 设置模块文档
- 新增 Godot 设置模块概述和核心类说明
- 添加音频设置系统详细文档包括 AudioBusMap 和 GodotAudioSettings
- 添加图形设置系统文档包括 GodotGraphicsSettings 实现
- 添加本地化设置系统文档包括 LocalizationMap 和 GodotLocalizationSettings
- 提供完整的架构设计图和使用示例代码
- 添加 API 详细说明和技术实现细节
- 包含最佳实践、性能考虑和故障排除指南
2026-04-05 19:54:09 +08:00
GeWuYou
41dd759379 feat(godot): 添加Godot本地化设置功能
- 新增LocalizationMap类实现用户语言到Godot locale和框架语言码的映射
- 创建GodotLocalizationSettings类同步应用本地化设置到Godot引擎和GFramework框架
- 添加测试项目配置文件GFramework.Game.Tests.csproj
- 实现本地化设置的单元测试验证语言同步功能
2026-04-05 19:54:02 +08:00
GeWuYou
46d8a7d4e2 chore(workflow): 移除发布状态检查
- 移除了 NuGet.org 和 GitHub Packages 发布状态检查
- 简化了发布工作流的输出信息
- 更新了合规性检查部分的格式
2026-04-05 18:51:47 +08:00
GeWuYou
1f34928785 feat(ci): 添加发布工作流支持NuGet和GitHub Packages
- 实现自动构建和打包功能,支持标签触发
- 集成NuGet.org和GitHub Packages双重发布机制
- 添加许可证合规性检查和SBOM文件生成
- 实现GitHub Release自动创建和资产上传
- 配置OIDC身份验证和临时API密钥管理
- 添加包重复上传检测和跳过功能
2026-04-05 18:49:08 +08:00
GeWuYou
6cac882fb4 refactor(coroutine): 简化协程调度器中的执行阶段访问
- 移除私有字段 _executionStage,直接使用构造函数参数 executionStage
- 更新 ExecutionStage 属性实现,直接返回构造函数参数
- 修改协程元数据设置时使用参数而非私有字段
- 调整等待指令判断逻辑,直接比较参数值
2026-04-05 15:21:51 +08:00
GeWuYou
ccffb121b3 fix(coroutine): 修复协程完成状态处理中的异常情况
- 为 CoroutineCompletionStatus 枚举添加默认分支处理
- 抛出 ArgumentOutOfRangeException 以处理不支持的协程完成状态
- 防止因未知状态值导致的运行时错误
- 提高协程调度器的健壮性和错误处理能力
2026-04-05 15:18:29 +08:00
GeWuYou
03346fbfe7 docs(coroutine): 更新协程系统文档
- 重构 Core 协程系统文档,优化概述和核心概念说明
- 新增 Godot 协程系统集成文档
- 添加协程系统使用教程
- 更新等待指令说明,包括时间、条件、Task 和事件等待
- 补充协程控制、快照查询和生命周期管理相关内容
- 修正代码示例和 API 使用说明
2026-04-05 15:06:53 +08:00
GeWuYou
1c41c57d72 feat(coroutine): 添加协程系统核心组件与Godot集成
- 实现CoroutineMetadata类存储协程元数据信息
- 创建CoroutineScheduler协程调度器管理协程生命周期
- 添加CoroutineSlot类管理单个协程执行状态
- 实现GodotTimeSource时间源支持缩放和真实时间
- 添加Timing类提供Godot协程管理功能
- 实现CoroutineNodeExtensions扩展方法支持节点生命周期管理
- 支持协程分组、标签、优先级等功能
- 提供协程暂停、恢复、终止等控制接口
- 实现协程统计和快照功能
- 添加等待指令处理机制支持多种等待类型
2026-04-05 15:06:35 +08:00
GeWuYou
34a333a0c1 fix(generator): 解决重复引用路径生成成员名称不稳定问题
- 使用 TryGetValue 方法替代 ContainsKey 检查避免多次访问字典
- 重用跟踪的重复计数确保重复引用路径保持生成的成员名称稳定
- 修复重复计数递增逻辑确保正确的序号生成
- 简化重复计数器的使用方式提高代码可读性
- 移除文件末尾多余空行保持代码整洁
2026-04-05 13:44:31 +08:00
GeWuYou
8c9fbb39b2 feat(config): 添加YAML配置加载器依赖注入支持
- 引入GFramework.Core.Abstractions.Events命名空间
- 添加YamlDotNet反序列化库相关引用
- 注册配置抽象层依赖到YAML配置加载器
- 更新测试文件中的命名空间引用以匹配新架构
2026-04-05 13:34:50 +08:00
GeWuYou
4ad89b10b2 chore(dependencies): 添加 Microsoft.Extensions.DependencyInjection 引用
- 在 ArchitectureComponentRegistry.cs 中添加 Microsoft.Extensions.DependencyInjection 引用
- 在 ArchitectureComponentRegistryBehaviorTests.cs 中添加 Microsoft.Extensions.DependencyInjection 引用
2026-04-05 13:28:32 +08:00
GeWuYou
8f6c453c1a refactor(architectures): 添加依赖注入服务引用
- 在 Architecture.cs 中引入 Microsoft.Extensions.DependencyInjection 命名空间
- 在 ArchitectureComponentActivator.cs 中引入 Microsoft.Extensions.DependencyInjection 命名空间
- 为架构组件激活器增加依赖注入支持
- 统一架构层的服务注册机制
2026-04-05 13:18:42 +08:00
GeWuYou
f7e05d19cc docs(core): 添加核心架构与CQRS模式详细文档
- 新增Architecture架构详解文档,包含设计目标、生命周期管理和组件注册等内容
- 新增CQRS与Mediator模式文档,详细介绍命令查询职责分离的实现方式
- 新增核心框架概述文档,提供完整的架构图和快速入门指南
- 完善架构组件联动说明,涵盖初始化、命令执行和事件传播流程
- 补充最佳实践指导,明确分层职责和通信方式选择原则
2026-04-05 11:02:00 +08:00
GeWuYou
bb2b3a0c60 refactor(arch): 重构架构组件注册机制
- 将组件注册逻辑提取到独立的 ArchitectureComponentRegistry 类中
- 实现 ArchitectureComponentActivator 来支持注册阶段实例化组件
- 更新系统和模型注册文档说明,明确在注册阶段创建实例并参与初始化
- 修复类型注册在架构准备就绪后的行为一致性问题
- 添加完整的组件注册行为测试覆盖实例注册、工厂注册和生命周期管理
- 优化依赖注入解析机制,支持构造函数依赖和单例缓存
2026-04-05 11:01:50 +08:00
GeWuYou
01dc1523a5 feat(architecture): 添加架构核心组件和依赖注入容器实现
- 实现 Architecture 基类,提供系统、模型、工具等组件的注册与管理功能
- 添加 ArchitectureComponentRegistry 组件注册管理器,负责管理系统、模型、工具的注册
- 实现 ArchitectureLifecycle 生命周期管理器,管理架构阶段转换和组件初始化
- 添加 ArchitectureModules 模块管理器,负责架构模块安装和中介行为注册
- 实现 MicrosoftDiContainer 依赖注入容器,包装 Microsoft.Extensions.DependencyInjection
- 提供完整的组件生命周期管理,支持同步和异步初始化模式
- 添加架构阶段管理和组件注册验证机制
2026-04-05 10:52:21 +08:00
GeWuYou
16fae83f70 feat(architectures): 添加架构基类和初始化编排功能
- 实现 Architecture 基类,提供系统、模型、工具等组件的注册与管理功能
- 添加 ArchitectureBootstrapper 协调器,负责初始化期间的基础设施准备工作
- 实现生命周期管理、组件注册管理和模块管理功能
- 提供同步和异步初始化方法,支持不同场景下的架构初始化需求
- 添加架构上下文绑定和 IOC 容器冻结功能,确保运行时依赖图稳定
- 实现架构生命周期钩子注册和阶段变更事件功能
- 添加完整的单元测试验证初始化编排流程的正确性
2026-04-05 10:03:48 +08:00
gewuyou
a22e522cf9
Merge pull request #173 from GeWuYou/refactor/analyzer-method-resolution
refactor(analyzer): 优化上下文注册分析器中的方法解析逻辑
2026-04-05 10:03:20 +08:00
GeWuYou
37049be600 refactor(analyzer): 重构上下文注册分析器中的辅助方法解析逻辑
- 修改 TryResolveArchitectureHelperMethod 和 TryResolveModuleHelperMethod 方法参数
- 添加新的 TryResolveHelperMethod 通用方法处理辅助方法调用解析
- 实现对显式 base 调用的特殊处理以保留基类语义
- 添加 IsExplicitBaseInvocation 方法检测显式基础调用
- 更新测试文件验证分析器核心行为
2026-04-05 09:14:15 +08:00
GeWuYou
d2ecd14ca8 refactor(analyzer): 优化上下文注册分析器中的方法解析逻辑
- 移除对已具备源码方法的特殊处理逻辑
- 统一使用 ResolveHierarchyMethodImplementation 进行方法解析
- 优先解析到当前具体架构类型上的 override 方法
- 为模块安装路径添加一致的 override 解析逻辑
- 添加完整的单元测试验证分析器行为
2026-04-05 00:25:14 +08:00
gewuyou
9239e51644
Merge pull request #172 from GeWuYou/feat/gframework-analysis
Feat/gframework analysis
2026-04-04 23:47:12 +08:00
GeWuYou
7901a69028 docs(generator): 更新上下文获取生成器文档中的措辞
- 将“强推断”更正为“强行推断”以提高表述准确性
2026-04-04 23:42:05 +08:00
GeWuYou
8eaf837327 refactor(analyzer): 优化上下文注册分析器中的语法匹配逻辑
- 使用属性模式匹配替换条件判断语句
- 简化了方法声明语法的空值检查逻辑
- 优化了构造函数声明语法的表达式体检查
- 提高了代码可读性和维护性
- 减少了冗余的语法树遍历操作
2026-04-03 23:50:09 +08:00
GeWuYou
c5a33ed571 docs(source-generators): 添加源代码生成器文档和测试项目配置
- 新增 Context Get 注入生成器详细文档,包含使用示例和诊断信息
- 添加源代码生成器总览文档,涵盖 Log、Config Schema、ContextAware 等功能
- 配置测试项目 GFramework.SourceGenerators.Tests 的项目文件和依赖
- 生成器诊断规则新增至 Unshipped 分析器发布跟踪文件
2026-04-03 23:48:24 +08:00
GeWuYou
7fda40de42 feat(game): 添加游戏内容配置系统实现
- 实现基于 YAML 的配置加载器支持
- 添加 JSON Schema 结构验证功能
- 实现一对象一文件的目录组织方式
- 提供运行时只读查询接口
- 添加 Source Generator 生成配置类型和表包装
- 实现 VS Code 插件配置浏览和编辑功能
- 添加开发期热重载支持
- 实现跨表引用校验机制
- 提供完整的配置系统文档说明
2026-04-03 22:58:05 +08:00
GeWuYou
ecf2309e11 docs(game): 添加游戏内容配置系统文档
- 介绍面向静态游戏内容的 AI-First 配表方案
- 说明配置系统管理怪物、物品、技能、任务等静态内容数据
- 描述 YAML 作为配置源文件和 JSON Schema 作为结构描述的支持
- 展示推荐的目录结构和 Schema 示例
- 提供完整的接入模板包括 csproj 配置、启动引导和运行时读取
- 详述运行时校验行为和跨表引用机制
- 说明开发期热重载功能和 VS Code 工具集成
- 列出当前限制和独立 Config Studio 评估结论
2026-04-03 22:01:10 +08:00
GeWuYou
ec4e2edeab feat(config): 添加AI-First游戏内容配置系统
- 实现YAML配置文件与JSON Schema结构描述支持
- 提供一对象一文件的目录组织方式
- 集成Source Generator生成配置类型和表包装代码
- 添加VS Code插件支持配置浏览和表单编辑功能
- 实现运行时只读查询和开发期热重载机制
- 支持跨表引用校验和轻量元数据复用
- 添加配置加载异常诊断和批量编辑入口
2026-04-03 21:17:39 +08:00
GeWuYou
61cc7eaa6d feat(config): 添加AI-First配置系统及文档
- 引入YAML配置源文件支持
- 实现JSON Schema结构描述功能
- 提供一对象一文件的目录组织方式
- 添加运行时只读查询能力
- 实现Source Generator生成配置类型和表包装
- 集成VS Code插件提供配置浏览和编辑功能
- 添加开发期热重载支持
- 提供跨表引用校验机制
- 创建配置生成器约定和绑定辅助类
- 添加详细的中文文档说明
- 实现集成测试验证生成器功能
2026-04-03 19:10:23 +08:00
gewuyou
ec5153f452
Merge pull request #170 from GeWuYou/test/game-integration-tests
Test/game integration tests
2026-04-03 17:47:37 +08:00
GeWuYou
b4e026a70d feat(config): 添加YAML配置文件的JSON Schema校验功能
- 实现了YAML配置文件与JSON Schema的运行时校验能力
- 支持嵌套对象、对象数组、标量数组的递归校验
- 提供跨表引用的约束检查与引用采集功能
- 支持enum枚举值与数值范围约束验证
- 实现详细的错误诊断信息与字段路径定位
- 包含完整的异常处理与错误报告机制
2026-04-03 17:08:24 +08:00
GeWuYou
0e538738df feat(game): 添加游戏内容配置系统和YAML配置校验器
- 实现面向静态游戏内容的AI-First配置方案,支持怪物、物品、技能、任务等数据管理
- 集成YAML作为配置源文件格式,JSON Schema作为结构描述标准
- 提供一对象一文件的目录组织结构和运行时只读查询功能
- 实现Source Generator生成配置类型、表包装和注册/访问辅助代码
- 添加VS Code插件支持配置浏览、raw编辑、schema打开和递归校验功能
- 创建YamlConfigSchemaValidator类提供YAML与JSON Schema的运行时校验能力
- 支持嵌套对象、对象数组、标量数组的递归校验和深层约束检查
- 实现跨表引用验证和配置热重载功能
- 提供详细的错误诊断信息和开发期工具链支持
2026-04-03 16:32:14 +08:00
GeWuYou
f63714f1e1 test(game): 添加游戏模块集成测试项目
- 创建了 GFramework.Game.Tests 测试项目配置文件
- 添加了 Microsoft.NET.Test.Sdk、Moq、NUnit 等测试依赖包
- 配置了项目引用包括 GFramework.Game、GFramework.Core 和源代码生成器
- 实现了自动生成配置消费者集成测试验证功能
- 添加了怪物配置模式定义用于端到端测试验证
- 创建了源代码生成器目标文件实现自动化配置收集
- 验证了消费者项目自动拾取 schema 并生成绑定的功能
2026-04-03 15:50:45 +08:00
gewuyou
14ed42cabe
Merge pull request #169 from GeWuYou/feat/game-content-config
feat(game): 添加游戏内容配置系统
2026-04-03 12:44:12 +08:00
GeWuYou
b1e9d0a345 feat(config): 添加基于YAML的配置加载器和架构验证器
- 实现YamlConfigLoader类,支持从文件目录加载YAML配置
- 添加热重载功能,监听配置文件变更并自动重新加载
- 实现YAML配置架构验证器,支持JSON Schema校验
- 添加跨表引用验证机制,确保配置依赖关系正确
- 支持配置表注册和类型安全的配置项访问
- 实现防抖机制避免频繁的文件变更触发
- 提供详细的错误诊断信息和异常处理
2026-04-03 12:31:58 +08:00
GeWuYou
081a65f740 feat(config): 添加YAML配置加载器依赖注入支持
- 引入GFramework.Core.Abstractions.Events命名空间
- 添加YamlDotNet反序列化库依赖
- 注册YAML配置加载器到依赖注入容器
- 更新单元测试中的命名空间引用
- 实现YAML配置文件的解析功能
- 添加配置加载过程中的事件发布机制
2026-04-03 12:21:03 +08:00
GeWuYou
12ce31f82a feat(game): 添加游戏内容配置系统
- 实现基于 YAML 的配置文件加载功能
- 集成 JSON Schema 结构验证和类型检查
- 提供一对象一文件的目录组织方式
- 支持运行时只读查询和类型安全访问
- 实现 Source Generator 生成配置类型和表包装
- 添加 VS Code 插件提供配置浏览和编辑功能
- 支持跨表引用校验和依赖关系管理
- 实现开发期热重载功能,支持配置变更自动刷新
- 提供完整的配置加载、验证、注册和访问接口
2026-04-03 12:00:32 +08:00
gewuyou
a92e514ffe
Merge pull request #168 from GeWuYou/feat/ai-first-config-system
feat(config): 添加AI-First配置系统及源生成器
2026-04-03 10:14:34 +08:00
GeWuYou
76479eb9f8 refactor(GFramework.SourceGenerators): 添加全局命名空间引用以支持代码生成
- 引入 System.Globalization 用于区域设置相关操作
- 添加 System.IO 支持文件输入输出功能
- 集成 System.Text 提供文本处理能力
- 包含 System.Text.Json 用于 JSON 序列化反序列化
2026-04-03 10:04:18 +08:00
GeWuYou
3bca6390ce feat(config): 添加JSON schema配置生成器
- 实现了根据JSON schema自动生成配置类型和配置表包装的功能
- 支持嵌套对象、对象数组、标量数组的类型生成
- 提供可映射的default/enum/ref-table元数据支持
- 生成强类型的配置表包装器和运行时绑定辅助类
- 实现了完整的schema解析和C#代码生成功能
- 添加了详细的XML文档注释和错误诊断功能
2026-04-03 09:53:51 +08:00
GeWuYou
48fd8a22bb feat(config): 添加AI-First配置系统及源生成器
- 实现YAML配置文件加载和JSON Schema校验功能
- 提供Source Generator自动生成配置类型和表包装类
- 添加VS Code插件支持配置浏览和表单编辑
- 支持跨表引用校验和开发期热重载功能
- 生成强类型的配置访问辅助方法和注册绑定
- 实现嵌套对象和对象数组的类型安全访问
2026-04-03 09:25:06 +08:00
gewuyou
eaa1e5dff4
Merge pull request #166 from GeWuYou/feat/config-content-system
Feat/config content system
2026-04-02 22:29:59 +08:00
GeWuYou
3c52c8c1ea feat(config): 添加配置验证和YAML解析功能
- 实现了配置模式解析器,支持递归对象/数组/标量树结构
- 添加了可编辑字段收集功能,支持标量和数组类型的批量编辑
- 集成了YAML解析器,支持嵌套对象、数组和注释提取
- 实现了配置验证诊断,支持中英文本地化错误消息
- 添加了表单更新应用功能,支持安全的嵌套对象编辑
- 实现了示例配置生成功能,包含模式描述作为YAML注释
- 提供了批量数组值解析和枚举值标准化工具函数
- 集成了多语言支持,包含中英文验证消息本地化
2026-04-02 22:22:46 +08:00
dependabot[bot]
ad13f58a45 Bump Godot.SourceGenerators from 4.6.1 to 4.6.2
---
updated-dependencies:
- dependency-name: Godot.SourceGenerators
  dependency-version: 4.6.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-02 22:01:42 +08:00
dependabot[bot]
14fb9f1fa1 Bump System.Text.Json from 8.0.5 to 8.0.6
---
updated-dependencies:
- dependency-name: System.Text.Json
  dependency-version: 8.0.6
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-02 22:01:25 +08:00
dependabot[bot]
c668dca7ba Bump GodotSharp and GodotSharpEditor
Bumps GodotSharp from 4.6.1 to 4.6.2
Bumps GodotSharpEditor from 4.6.1 to 4.6.2

---
updated-dependencies:
- dependency-name: GodotSharp
  dependency-version: 4.6.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: GodotSharpEditor
  dependency-version: 4.6.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-02 21:52:22 +08:00
GeWuYou
55602b16f2 chore(workflow): 激活 VS Code 扩展发布工作流配置
- 移除注释符号以启用工作流定义
- 恢复完整的 GitHub Actions 工作流配置
- 保留所有扩展版本发布和包管理功能
- 维持 Node.js 和 Bun 环境设置步骤
- 保持 VSIX 包生成和市场发布的完整流程
2026-04-02 21:42:46 +08:00
dependabot[bot]
093f01ed98 chore(deps): bump trufflesecurity/trufflehog from 3.94.1 to 3.94.2
Bumps [trufflesecurity/trufflehog](https://github.com/trufflesecurity/trufflehog) from 3.94.1 to 3.94.2.
- [Release notes](https://github.com/trufflesecurity/trufflehog/releases)
- [Commits](https://github.com/trufflesecurity/trufflehog/compare/v3.94.1...v3.94.2)

---
updated-dependencies:
- dependency-name: trufflesecurity/trufflehog
  dependency-version: 3.94.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-02 21:41:53 +08:00
dependabot[bot]
32e57eb1b9 Bump Meziantou.Analyzer from 3.0.27 to 3.0.43
---
updated-dependencies:
- dependency-name: Meziantou.Analyzer
  dependency-version: 3.0.43
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: Meziantou.Analyzer
  dependency-version: 3.0.43
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: Meziantou.Analyzer
  dependency-version: 3.0.43
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: Meziantou.Analyzer
  dependency-version: 3.0.43
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: Meziantou.Analyzer
  dependency-version: 3.0.43
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-02 21:40:45 +08:00
dependabot[bot]
4ae1b31d60 Bump Scriban from 7.0.5 to 7.0.6
---
updated-dependencies:
- dependency-name: Scriban
  dependency-version: 7.0.6
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-02 21:40:30 +08:00
GeWuYou
94f0f536ea feat(config): 添加游戏内容配置系统和VS Code工具
- 实现YAML配置源文件和JSON Schema结构描述
- 提供一对象一文件的目录组织方式
- 集成Source Generator生成配置类型和表包装
- 开发VS Code插件支持配置浏览和编辑功能
- 实现运行时只读查询和热重载机制
- 添加跨表引用校验和批量编辑入口
2026-04-02 21:29:07 +08:00
dependabot[bot]
3f26231c84 Bump Meziantou.Polyfill from 1.0.104 to 1.0.106
---
updated-dependencies:
- dependency-name: Meziantou.Polyfill
  dependency-version: 1.0.106
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: Meziantou.Polyfill
  dependency-version: 1.0.106
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-02 21:26:23 +08:00
GeWuYou
6df348fb4e feat(config-tool): 添加 VS Code 扩展实现配置文件管理功能
- 根据 VS Code 当前界面语言在英文和简体中文之间切换主要工具界面文本
- 实现配置验证消息的本地化支持,包括数组、标量、枚举等类型的错误提示
- 添加完整的 VS Code 扩展框架,支持配置文件浏览、验证和表单预览
- 实现批量编辑功能,支持对同一配置域内的多个 YAML 文件执行字段更新
- 集成诊断功能,在编辑器中显示配置验证错误和警告
- 提供树形视图展示配置目录结构和文件列表
2026-04-02 20:45:02 +08:00
gewuyou
3dbe7a979f
Merge pull request #158 from GeWuYou/feat/game-config
Feat/game config
2026-04-02 09:06:24 +08:00
GeWuYou
988d7f85fd docs(config): 添加配置系统文档和VS Code工具
- 更新GitHub工作流中工具路径配置
- 新增游戏内容配置系统详细文档
- 创建VS Code扩展包描述文件
- 添加VS Code扩展功能说明文档
2026-04-02 08:46:34 +08:00
GeWuYou
642f2641ec chore(ci): 禁用 VS Code 扩展发布工作流
- 注释掉整个 GitHub Actions 工作流配置文件
- 暂时停用扩展发布到 Visual Studio Marketplace 的功能
- 保留原始配置代码以备后续启用
2026-04-02 08:24:49 +08:00
GeWuYou
01616c745d feat(config-tool): 添加配置验证工具和相关功能
- 实现了配置模式解析器,支持嵌套对象和数组结构
- 添加了YAML解析和验证功能,支持语法检查和类型匹配
- 实现了批量编辑器,支持标量和标量数组属性的更新
- 添加了表单更新应用功能,可将更改写回YAML文件
- 提供了完整的单元测试覆盖核心功能验证
- 配置了项目依赖管理和忽略规则
- 添加了Apache 2.0许可证文件
2026-04-01 23:06:44 +08:00
GeWuYou
2d02c1efdd feat(core): 迁移项目基础配置和依赖
- 添加项目配置验证模块 configValidation.js
- 创建扩展功能模块 extension.js
- 添加配置验证测试文件 configValidation.test.js
- 配置 .gitignore 忽略规则
- 添加 LICENSE 许可证文件
- 创建 package.json 项目依赖配置
- 添加 README.md 项目说明文档
2026-04-01 23:05:48 +08:00
GeWuYou
9e3efa04c7 chore(vscode-config-extension): 更新发布者名称为大写格式
- 将 publisher 字段从 gewuyou 更改为 GeWuYou
- 保持其他配置信息不变
2026-04-01 23:00:03 +08:00
GeWuYou
4c6deb4097 feat(vscode-extension): 添加 GFramework 配置工具扩展
- 创建 VS Code 扩展用于浏览、验证和编辑 GFramework 项目的配置文件
- 实现配置文件浏览器视图和相关命令功能
- 添加 YAML 文件和匹配模式文件的打开功能
- 实现嵌套对象字段的轻量级表单预览功能
- 添加批量编辑配置域的功能
- 集成轻量级模式验证支持
- 创建 GitHub Actions 工作流用于打包和发布扩展
- 配置扩展的激活事件和菜单贡献点
- 设置工作区配置选项用于指定配置和模式路径
2026-04-01 22:58:47 +08:00
GeWuYou
38bd934779 feat(docs): 添加游戏内容配置系统文档和VSCode插件功能
- 新增游戏内容配置系统完整文档,介绍AI-First配表方案
- 实现YAML配置源文件和JSON Schema结构描述功能
- 添加运行时只读查询和Source Generator类型生成能力
- 集成VSCode插件提供配置浏览、校验和表单编辑功能
- 支持开发期热重载和跨表引用校验机制
- 提供批量编辑和嵌套对象安全表单入口
2026-04-01 21:35:53 +08:00
gewuyou
65a6e2c257
Merge pull request #157 from GeWuYou/feat/game-content-config-yaml-schema
feat(game): 添加游戏内容配置系统及YAML Schema校验器
2026-04-01 21:09:58 +08:00
GeWuYou
03580d6836 feat(game): 添加游戏内容配置系统及YAML Schema校验器
- 实现AI-First配表方案,支持怪物、物品、技能等静态内容管理
- 集成YAML配置源文件与JSON Schema结构描述功能
- 提供一对象一文件的目录组织方式和运行时只读查询能力
- 实现Source Generator生成配置类型和表包装类
- 集成VS Code插件提供配置浏览、raw编辑和递归校验功能
- 开发YamlConfigSchemaValidator实现JSON Schema子集校验
- 支持嵌套对象、对象数组、标量数组与深层enum引用约束校验
- 实现跨表引用检测和热重载时依赖表联动校验机制
2026-04-01 21:02:25 +08:00
gewuyou
965f20059f
Merge pull request #156 from GeWuYou/feat/config-management
Feat/config management
2026-04-01 12:54:45 +08:00
GeWuYou
c84f62897c refactor(config): 优化YAML配置模式验证器中的允许值检查逻辑
- 将传统的空值检查和计数判断替换为更简洁的模式匹配语法
- 使用集合表达式简化代码结构,提高可读性
- 保持原有的功能逻辑不变,仅优化代码风格
2026-04-01 12:47:31 +08:00
GeWuYou
ad87f72ca6 feat(game): 添加游戏内容配置系统
- 实现基于YAML的配置文件管理和JSON Schema校验功能
- 提供YamlConfigSchemaValidator用于运行时配置校验和跨表引用检查
- 添加完整的单元测试覆盖配置加载器的各种场景
- 支持热重载功能,开发期修改配置文件后自动刷新运行时表
- 集成Source Generator生成配置类型和表包装类
- 提供VS Code插件支持配置浏览、编辑和校验操作
2026-04-01 12:38:52 +08:00
GeWuYou
5b8099cd98 feat(game): 添加游戏内容配置系统和VS Code插件支持
- 实现基于YAML的配置源文件和JSON Schema结构验证
- 提供运行时只读查询和Source Generator代码生成
- 添加VS Code插件实现配置浏览、编辑和轻量校验功能
- 支持开发期热重载和跨表引用校验
- 实现批量编辑和表单预览功能
2026-04-01 10:18:34 +08:00
GeWuYou
15761c6677 feat(game): 添加基于YAML的游戏内容配置系统
- 实现YamlConfigLoader支持从YAML文件加载配置数据
- 提供ConfigRegistry用于统一管理命名的配置表
- 支持JSON Schema校验配置结构和类型匹配
- 实现跨表引用校验避免无效引用和缺失依赖
- 提供开发期热重载功能监听文件变更自动刷新
- 支持一对象一文件的目录组织方式
- 集成VS Code插件提供配置浏览和轻量校验
- 生成器支持从schema自动生成配置类型定义
- 文档说明配置系统的使用方法和推荐目录结构
2026-04-01 09:04:28 +08:00
GeWuYou
0c662ced2a feat(game): 添加游戏内容配置系统和VS Code插件支持
- 实现YAML配置文件管理和JSON Schema验证功能
- 提供运行时只读查询和Source Generator代码生成功能
- 开发VS Code插件实现配置浏览、校验和轻量表单编辑
- 支持开发期热重载和配置变更自动刷新机制
- 集成诊断功能提供配置文件错误提示和修复建议
2026-03-31 22:49:10 +08:00
GeWuYou
e8d0ea2daf feat(game): 添加游戏内容配置系统和VS Code扩展
- 引入基于YAML和JSON Schema的静态内容配置系统
- 实现运行时只读查询和Source Generator支持
- 提供VS Code扩展用于配置浏览、验证和轻量编辑
- 支持开发期热重载和跨表引用校验功能
- 包含完整的文档说明和工具链集成
2026-03-31 22:44:58 +08:00
GeWuYou
3332aaff7b feat(config): 添加YAML配置加载器及开发期热重载功能
- 实现YamlConfigLoader支持基于文件目录的YAML配置加载
- 添加EnableHotReload方法支持开发期配置文件变更自动重载
- 提供带schema校验的配置表注册功能
- 实现按表粒度的热重载机制及错误处理回调
- 添加配置文件变更监听和防抖处理
- 更新文档说明热重载使用方法和行为特性
- 移除未完成功能列表中的运行时热重载项
2026-03-31 22:39:39 +08:00
GeWuYou
ae9693e0ff refactor(config): 更新配置加载器依赖项
- 在YamlConfigLoader中添加YamlDotNet序列化库引用
- 移除YamlConfigSchemaValidator中的未使用引用
- 在全局引用中添加YAML处理相关库引用
- 优化配置模块的依赖管理和命名空间使用
2026-03-31 22:32:57 +08:00
GeWuYou
b87e511334 docs(game): 添加游戏模块完整文档
- 创建了 GFramework.Game 模块的全面文档
- 包含架构模块系统、资产管理、存储系统和序列化系统详解
- 提供了 AbstractModule、AbstractAssetCatalogUtility 等核心组件使用示例
- 添加了分层存储、加密存储和缓存存储的实现方案
- 集成了 JSON 序列化、自定义转换器和版本化数据管理
- 提供了完整的游戏数据管理系统和自动保存系统实现
- 修改了 VitePress 配置文件
2026-03-31 22:30:33 +08:00
gewuyou
a10cc5b6f0
Merge pull request #155 from GeWuYou/docs/add-vitepress-config-with-escape-plugin
docs(vitepress): 添加文档站点配置文件
2026-03-31 19:54:05 +08:00
GeWuYou
4c64db3c58 docs(vitepress): 添加文档站点配置文件
- 实现 safeGenericEscapePlugin 插件解决 Markdown 中泛型符号转义问题
- 配置 VitePress 文档站点基本信息包括标题、描述和基础路径
- 设置多语言支持和本地搜索功能的中文翻译
- 定义导航菜单结构包含入门指南、核心框架、ECS系统等模块
- 配置侧边栏按模块分组显示详细文档页面链接
- 添加社交媒体链接、页脚信息和主题切换等 UI 元素
- 设置代码块大小警告阈值以适应大量代码示例
2026-03-31 19:28:24 +08:00
gewuyou
783570bae0
Merge pull request #154 from GeWuYou/docs/source-generators-complete-documentation
feat(docs): 初始化 GFramework 文档站点配置
2026-03-31 18:41:56 +08:00
GeWuYou
24dc2bb9cf feat(docs): 初始化 GFramework 文档站点配置
- 添加 VitePress 配置文件,设置文档标题和描述
- 实现安全泛型转义插件,保护代码块和 HTML 标签
- 配置多语言支持,设置简体中文为默认语言
- 设置文档导航栏,包含入门指南、核心框架、ECS 等模块
- 配置侧边栏结构,按模块划分文档目录
- 添加本地搜索功能,配置中文翻译选项
- 设置 GitHub Pages 部署基础路径
- 配置社交链接和页脚信息
2026-03-31 18:37:11 +08:00
gewuyou
059d5a8f41
Merge pull request #153 from GeWuYou/docs/source-generators-complete-documentation
docs(source-generators): 添加源代码生成器完整文档
2026-03-31 17:26:20 +08:00
GeWuYou
38020c32a2 docs(source-generators): 添加源代码生成器完整文档
- 新增 GFramework.SourceGenerators 主文档,介绍编译时代码生成工具
- 详细说明 Log 属性生成器的使用方法和配置选项
- 完整描述 ContextAware 属性生成器的功能和测试场景配置
- 添加 GenerateEnumExtensions 属性生成器文档和使用示例
- 介绍 GetNode 生成器(Godot 专用)的节点获取功能
- 新增 BindNodeSignal 生成器文档,说明信号绑定与解绑机制
- 提供 Context Get 注入生成器的完整使用指南
- 添加诊断信息章节,涵盖所有生成器的错误提示和解决方案
- 包含性能优势对比和基准测试结果
- 提供多个完整使用示例,展示实际应用场景
- 整理最佳实践和常见问题解答
- 添加 BindNodeSignal 生成器专用文档,详细介绍其高级用法
2026-03-31 15:10:06 +08:00
gewuyou
ba45171924
Merge pull request #152 from GeWuYou/feat/bindnodesignal-generator
Feat/bindnodesignal generator
2026-03-31 12:15:54 +08:00
GeWuYou
693cad2adf refactor(generators): 统一添加必要的命名空间引用
- 在 BindNodeSignalDiagnostics.cs 中添加 Microsoft.CodeAnalysis 引用
- 在 BindNodeSignalGenerator.cs 中添加 Roslyn 相关命名空间引用
- 在 GetNodeGenerator.cs 中添加 Roslyn 相关命名空间引用
- 在 GlobalUsings.cs 中集中管理全局命名空间引用
- 在 ContextGetGenerator.cs 中添加字符串和扩展方法引用
- 在 CommonDiagnostics.cs 中添加诊断相关命名空间引用
- 在 Common 全局引用文件中统一管理 Microsoft.CodeAnalysis 引用
2026-03-31 12:09:47 +08:00
GeWuYou
6fa4580893 feat(generator): 添加 BindNodeSignal 和 GetNode 源代码生成器
- 实现 BindNodeSignalGenerator 用于生成节点信号绑定与解绑逻辑
- 实现 GetNodeGenerator 用于生成 Godot 节点获取注入逻辑
- 添加 BindNodeSignalDiagnostics 提供详细的诊断错误信息
- 集成到 AnalyzerReleases.Unshipped.md 追踪新的分析规则
- 支持 [BindNodeSignal] 属性的方法自动生成事件绑定代码
- 支持 [GetNode] 属性的字段自动生成节点获取代码
- 提供生命周期方法集成的智能提示和验证功能
2026-03-31 11:11:23 +08:00
GeWuYou
2dfd6e044f feat(Godot.SourceGenerators): 添加 BindNodeSignal 源代码生成器
- 实现 BindNodeSignalGenerator 源代码生成器,用于自动化节点信号绑定
- 添加完整的诊断系统,包含 11 种不同的错误和警告场景检测
- 生成对称的绑定和解绑方法,确保资源正确释放
- 支持一个处理方法通过多个特性绑定到多个节点事件
- 实现生命周期钩子调用检查,确保在 _Ready 和 _ExitTree 中正确调用生成的方法
- 提供详细的单元测试覆盖各种使用场景和边界条件
- 生成器与现有的 GetNode 声明完全兼容并可共存
- 包含命名冲突检测和构造参数验证等安全检查机制
2026-03-31 10:26:44 +08:00
GeWuYou
9cca190aff docs(generator): 添加源码生成器文档和分析器规则清单
- 新增 AnalyzerReleases.Unshipped.md 文件记录代码分析规则
- 添加 GF_Godot_GetNode 系列规则定义(001-006)
- 添加 GF_Godot_BindNodeSignal 系列规则定义(001-009)
- 创建 README.md 文件详述源码生成器使用方法
- 文档化 GetNode 和 BindNodeSignal 特性用法示例
- 说明 Godot 场景相关的编译期生成能力
2026-03-31 10:03:31 +08:00
GeWuYou
5b996d8618 feat(generator): 添加 BindNodeSignal 源生成器实现
- 实现 BindNodeSignalGenerator 源生成器,用于自动生成 Godot 节点事件绑定与解绑逻辑
- 添加 BindNodeSignalAttribute 特性,标记需要生成绑定逻辑的事件处理方法
- 实现完整的诊断系统,包括嵌套类型、静态方法、字段类型等错误检查
- 添加生命周期方法调用检查,在 _Ready 和 _ExitTree 中验证生成方法的调用
- 支持方法签名与事件委托的兼容性验证
- 实现单元测试覆盖各种使用场景和错误情况
2026-03-31 09:39:06 +08:00
GeWuYou
91f0375461 refactor(tests): 更新测试驱动程序依赖
- 添加 Microsoft.CodeAnalysis.CSharp 命名空间引用
- 优化代码结构以支持 C# 语法分析功能
- 提升测试驱动程序的编译器集成能力
2026-03-30 18:41:52 +08:00
GeWuYou
9972788c32 feat(vscode): 添加 GFramework 配置工具扩展
- 实现配置文件浏览器功能,支持工作区 config 目录下的 YAML 文件浏览
- 添加配置文件验证功能,支持基于 JSON Schema 的轻量级验证
- 提供表单预览界面,支持顶层标量字段的编辑功能
- 实现配置文件与匹配模式文件的快速打开功能
- 添加工作区设置选项,可自定义配置和模式目录路径
- 支持实时保存和验证反馈,集成 VSCode 诊断集合显示错误警告
2026-03-30 18:37:15 +08:00
GeWuYou
c9d2306295 feat(generator): 添加JSON schema配置代码生成功能
- 实现SchemaConfigGenerator源代码生成器
- 支持从JSON schema文件生成配置类型和表包装类
- 添加ConfigSchemaDiagnostics诊断系统
- 集成System.Text.Json包依赖
- 生成强类型的配置访问接口
- 支持多种数据类型包括整数、浮点数、布尔值、字符串和数组
- 实现id字段作为表主键的约束验证
- 添加完整的单元测试和快照验证
2026-03-30 18:29:31 +08:00
GeWuYou
5fa12dcd37 feat(config): 添加YAML配置加载器支持
- 新增YamlConfigLoader类支持基于目录的YAML配置加载
- 添加对.yaml和.yml文件格式的自动识别和解析
- 实现异步加载任务支持取消令牌
- 集成YamlDotNet库进行YAML反序列化处理
- 支持驼峰命名约定和忽略未匹配属性
- 实现配置表注册的链式API设计
- 添加详细的加载过程异常处理和错误信息
- 提供完整的单元测试覆盖各种加载场景
- 更新项目依赖添加YamlDotNet包引用16.3.0版本
2026-03-30 14:13:26 +08:00
GeWuYou
c0aa8ba70e feat(config): 添加配置管理系统核心组件
- 实现了 ConfigRegistry 配置注册表,支持按名称注册和类型安全查询
- 创建了 InMemoryConfigTable 内存配置表,提供基于字典的只读配置存储
- 定义了 IConfigLoader、IConfigRegistry 和 IConfigTable 接口契约
- 添加了完整的单元测试验证配置表的注册、查询和类型检查功能
- 在项目文件中添加了新的代码文件夹结构
- 实现了配置表的覆盖策略以支持开发期热重载需求
2026-03-30 13:18:54 +08:00
1450 changed files with 144094 additions and 49077 deletions

89
.agents/skills/README.md Normal file
View File

@ -0,0 +1,89 @@
# GFramework Skills
公开入口目前包含 `gframework-doc-refresh``gframework-batch-boot`
## 公开入口
### `gframework-doc-refresh`
按源码模块驱动文档刷新,而不是按 `guide``tutorial``api` 等类型拆入口。
适用场景:
- 刷新某个模块的 landing page
- 复核专题页是否与源码、测试、README 一致
- 评估是否需要补 API reference 或教程
- 在 adoption path 不清晰时引入 `ai-libs/` 消费者接法作为补充证据
推荐调用:
```bash
/gframework-doc-refresh <module>
```
示例:
```bash
/gframework-doc-refresh Core
/gframework-doc-refresh Godot.SourceGenerators
/gframework-doc-refresh Cqrs
```
### `gframework-batch-boot`
`gframework-boot` 的基础上,自动推进可分批执行的重复性任务,不需要人工一轮轮重新触发。
适用场景:
- analyzer warning reduction
- 大批量测试结构收口
- 分模块文档刷新 wave
- 任何有明确 stop condition 的多批次任务
推荐调用:
```bash
/gframework-batch-boot <task-or-stop-condition>
```
批处理阈值速记:
```bash
/gframework-batch-boot 75
/gframework-batch-boot 75 2000
```
- 单个数字默认表示“当前分支全部提交相对远程 `origin/main` 接近多少个文件变更时停止”
- 两个数字默认表示“当前分支全部提交相对远程 `origin/main``文件数 OR 变更行数`”,顺序固定为 `<files> <lines>`
- 不推荐写 `/gframework-batch-boot 75 | 2000`,因为 `|` 很像 shell pipe若用户这样写也应按 OR 语义理解并在后续说明中归一化成无 `|` 版本
示例:
```bash
/gframework-batch-boot 75
/gframework-batch-boot 75 2000
/gframework-batch-boot continue analyzer warning reduction until branch diff vs origin/main approaches 75 files
/gframework-batch-boot keep refactoring repetitive source-generator tests in bounded batches
```
## 共享资源
- `_shared/DOCUMENTATION_STANDARDS.md`
- 统一的文档规则、证据顺序与验证要求
- `_shared/module-map.json`
- 机器可读的模块映射表
- `_shared/module-config.sh`
- 轻量 shell 辅助函数
## 内部资源
`gframework-doc-refresh/` 下包含:
- `references/`
- 模块选择、证据顺序、输出策略
- `templates/`
- landing page、专题页、API reference、教程模板
- `scripts/`
- 模块扫描与文档验证脚本
`vitepress-*` skills 不再作为并列公开入口保留。

View File

@ -0,0 +1,126 @@
# GFramework 文档编写规范
本文件只保留跨模块稳定生效的写作与校验规则,不再维护容易失真的固定页面清单。
模块到源码、测试、README、`docs/zh-CN` 栏目以及 `ai-libs/` 参考入口的映射,统一以
`.agents/skills/_shared/module-map.json` 为准。
## 证据顺序
统一按以下顺序判断文档应写什么、删什么、保留什么:
1. 源码、公开 XML docs、`*.csproj`
2. 对应测试和 snapshot
3. 模块 `README.md`
4. 当前 `docs/zh-CN` 页面
5. `ai-libs/` 下已验证的消费者项目
6. 归档文档,仅在前述证据无法解释当前行为时回看
不要把旧文档互相抄写当成“更新”。
## 模块驱动规则
- 先按源码模块归一化输入,再决定落到 landing page、专题页、API reference、教程还是仅做校验。
- 如果用户给的是栏目名而不是源码模块名,先映射回模块;若仍有歧义,只给归一化建议,不直接生成文档。
- 文档栏目是派生输出,不是主输入源。
## `ai-libs/` 使用边界
`ai-libs/` 只用于补消费者视角证据:
- 验证真实接入目录结构
- 查最小 wiring、扩展点装配方式
- 给 adoption path 提供端到端例子
不要用 `ai-libs/` 覆盖以下事实:
- 公共 API 契约
- 当前版本支持范围
- Source Generator 诊断与生成语义
如果 `ai-libs/` 与当前源码或测试冲突,以当前仓库实现为准,并在文档里写明迁移或兼容边界。
## 公开文档边界
- `README.md``docs/**` 面向框架使用者,不面向治理执行者。
- 不要把 inventory、覆盖基线、恢复点、批处理阈值、review 线程、待补审计波次等内部治理信息写进公开页面。
- XML、README、测试与 `ai-libs/` 证据可以驱动文档决策,但公开页面只能输出读者真正需要的内容:
- 模块边界
- 最小接入路径
- 推荐阅读顺序
- 源码 / XML / API 的入口提示
- 如果确实需要保留治理基线、盘点结果或后续治理计划,把它写到 `ai-plan/**` 或其他 contributor-only 记录里。
- 当页面需要引用 XML 文档时,写“应优先查看哪些类型、命名空间或契约,以及为什么”,不要写覆盖数量、盘点日期或“已覆盖 / 未覆盖”状态。
## Markdown 规则
### 泛型与 HTML 转义
代码块外出现泛型或 XML 标签时必须转义:
- `List&lt;T&gt;`
- `Result&lt;TValue, TError&gt;`
- `&lt;summary&gt;`
- `&lt;param&gt;`
### Frontmatter
每个文档都必须包含合法 frontmatter
```yaml
---
title: 文档标题
description: 1-2 句话描述当前页面解决什么问题
---
```
### 代码块
- 始终标注语言,如 `csharp``bash``json`
- 示例只保留当前实现可追溯的最小路径
- 必要时写中文注释解释接入原因或边界,不要堆砌与代码同步无关的注释
### 链接
- 只链接到当前仓库真实存在的页面
- 站内链接优先使用 `/zh-CN/...` 形式
- 如果文档站不允许跳出 `docs/` 根目录,就不要把仓库 README 写成站内链接
## 输出优先级
统一按以下顺序决定产出:
1. 先修模块 README、landing page 与 adoption path
2. 再修失真的专题页
3. 再补 API reference
4. 最后才补教程
## 用户页检查点
- 用户读完页面后,应知道怎么采用、该看哪几个入口,而不是知道当前治理批次做到哪一轮。
- 如果一段内容删掉日期、数量、基线、治理术语后就失去价值,它大概率不该出现在公开文档里。
- 表格优先表达“何时看什么、解决什么问题”,不要表达“当前盘点覆盖到哪里”。
## 验证清单
- [ ] frontmatter 正确
- [ ] 代码块语言标记齐全
- [ ] 泛型和 XML 标签已转义
- [ ] 站内链接存在
- [ ] 示例与当前实现一致
- [ ] `ai-libs/` 只作为消费者接入参考,没有覆盖源码契约
## 验证工具
统一复用 `gframework-doc-refresh/scripts/` 下的校验脚本:
- `validate-frontmatter.sh`
- `validate-links.sh`
- `validate-code-blocks.sh`
- `validate-all.sh`
需要站点级验证时,执行:
```bash
cd docs && bun run build
```

View File

@ -0,0 +1,271 @@
#!/bin/bash
# 共享的模块配置
# 机器可读映射以 .agents/skills/_shared/module-map.json 为准。
normalize_module() {
local INPUT
INPUT="$(echo "$1" | tr '[:upper:]' '[:lower:]' | tr ' ' '-' | tr '_' '-')"
case "$INPUT" in
core|core-runtime|runtime-core|core-module)
echo "Core"
;;
core.abstractions|core-abstractions)
echo "Core.Abstractions"
;;
core.sourcegenerators|core-source-generators|core-sourcegenerators)
echo "Core.SourceGenerators"
;;
core.sourcegenerators.abstractions|core-source-generators-abstractions)
echo "Core.SourceGenerators.Abstractions"
;;
game|game-runtime|runtime-game|game-module)
echo "Game"
;;
game.abstractions|game-abstractions)
echo "Game.Abstractions"
;;
game.sourcegenerators|game-source-generators)
echo "Game.SourceGenerators"
;;
godot|godot-runtime|runtime-godot|godot-module)
echo "Godot"
;;
godot.sourcegenerators|godot-source-generators|godot-generators)
echo "Godot.SourceGenerators"
;;
godot.sourcegenerators.abstractions|godot-source-generators-abstractions)
echo "Godot.SourceGenerators.Abstractions"
;;
cqrs|mediator|cqrs-module)
echo "Cqrs"
;;
cqrs.abstractions|cqrs-abstractions)
echo "Cqrs.Abstractions"
;;
cqrs.sourcegenerators|cqrs-source-generators)
echo "Cqrs.SourceGenerators"
;;
ecs|ecs.arch|ecs-arch)
echo "Ecs.Arch"
;;
ecs.arch.abstractions|ecs-arch-abstractions)
echo "Ecs.Arch.Abstractions"
;;
sourcegenerators.common|source-generators-common)
echo "SourceGenerators.Common"
;;
*)
return 1
;;
esac
}
get_all_modules() {
cat <<'EOF'
Core
Core.Abstractions
Core.SourceGenerators
Core.SourceGenerators.Abstractions
Game
Game.Abstractions
Game.SourceGenerators
Godot
Godot.SourceGenerators
Godot.SourceGenerators.Abstractions
Cqrs
Cqrs.Abstractions
Cqrs.SourceGenerators
Ecs.Arch
Ecs.Arch.Abstractions
SourceGenerators.Common
EOF
}
is_valid_module() {
normalize_module "$1" >/dev/null 2>&1
}
get_source_dirs() {
local MODULE
MODULE="$(normalize_module "$1")" || return 1
case "$MODULE" in
Core)
echo "GFramework.Core"
;;
Core.Abstractions)
echo "GFramework.Core.Abstractions"
;;
Core.SourceGenerators)
echo "GFramework.Core.SourceGenerators"
;;
Core.SourceGenerators.Abstractions)
echo "GFramework.Core.SourceGenerators.Abstractions"
;;
Game)
echo "GFramework.Game"
;;
Game.Abstractions)
echo "GFramework.Game.Abstractions"
;;
Game.SourceGenerators)
echo "GFramework.Game.SourceGenerators"
;;
Godot)
echo "GFramework.Godot"
;;
Godot.SourceGenerators)
echo "GFramework.Godot.SourceGenerators"
;;
Godot.SourceGenerators.Abstractions)
echo "GFramework.Godot.SourceGenerators.Abstractions"
;;
Cqrs)
echo "GFramework.Cqrs"
;;
Cqrs.Abstractions)
echo "GFramework.Cqrs.Abstractions"
;;
Cqrs.SourceGenerators)
echo "GFramework.Cqrs.SourceGenerators"
;;
Ecs.Arch)
echo "GFramework.Ecs.Arch"
;;
Ecs.Arch.Abstractions)
echo "GFramework.Ecs.Arch.Abstractions"
;;
SourceGenerators.Common)
echo "GFramework.SourceGenerators.Common"
;;
esac
}
get_test_projects() {
local MODULE
MODULE="$(normalize_module "$1")" || return 1
case "$MODULE" in
Core|Core.Abstractions)
echo "GFramework.Core.Tests/GFramework.Core.Tests.csproj"
;;
Core.SourceGenerators|Core.SourceGenerators.Abstractions|Game.SourceGenerators|Cqrs.SourceGenerators|SourceGenerators.Common)
echo "GFramework.SourceGenerators.Tests/GFramework.SourceGenerators.Tests.csproj"
;;
Game|Game.Abstractions)
echo "GFramework.Game.Tests/GFramework.Game.Tests.csproj"
;;
Godot)
echo "GFramework.Godot.Tests/GFramework.Godot.Tests.csproj"
;;
Godot.SourceGenerators|Godot.SourceGenerators.Abstractions)
echo "GFramework.Godot.SourceGenerators.Tests/GFramework.Godot.SourceGenerators.Tests.csproj"
;;
Cqrs|Cqrs.Abstractions)
echo "GFramework.Cqrs.Tests/GFramework.Cqrs.Tests.csproj"
;;
Ecs.Arch|Ecs.Arch.Abstractions)
echo "GFramework.Ecs.Arch.Tests/GFramework.Ecs.Arch.Tests.csproj"
;;
esac
}
get_readme_paths() {
local MODULE
MODULE="$(normalize_module "$1")" || return 1
case "$MODULE" in
Core)
echo "GFramework.Core/README.md"
;;
Core.Abstractions)
echo "GFramework.Core.Abstractions/README.md"
;;
Core.SourceGenerators)
echo "GFramework.Core.SourceGenerators/README.md"
;;
Core.SourceGenerators.Abstractions)
echo "GFramework.Core.SourceGenerators.Abstractions/README.md"
;;
Game)
echo "GFramework.Game/README.md"
;;
Game.Abstractions)
echo "GFramework.Game.Abstractions/README.md"
;;
Game.SourceGenerators)
echo "GFramework.Game.SourceGenerators/README.md"
;;
Godot)
echo "GFramework.Godot/README.md"
;;
Godot.SourceGenerators)
echo "GFramework.Godot.SourceGenerators/README.md"
;;
Godot.SourceGenerators.Abstractions)
echo "GFramework.Godot.SourceGenerators.Abstractions/README.md"
;;
Cqrs)
echo "GFramework.Cqrs/README.md"
;;
Cqrs.Abstractions)
echo "GFramework.Cqrs.Abstractions/README.md"
;;
Cqrs.SourceGenerators)
echo "GFramework.Cqrs.SourceGenerators/README.md"
;;
Ecs.Arch)
echo "GFramework.Ecs.Arch/README.md"
;;
Ecs.Arch.Abstractions)
echo "GFramework.Ecs.Arch.Abstractions/README.md"
;;
SourceGenerators.Common)
echo "GFramework.SourceGenerators.Common/README.md"
;;
*)
return 1
;;
esac
}
infer_module_from_namespace() {
local NAMESPACE="$1"
if [[ "$NAMESPACE" == GFramework.Core.SourceGenerators.Abstractions* ]]; then
echo "Core.SourceGenerators.Abstractions"
elif [[ "$NAMESPACE" == GFramework.Core.SourceGenerators* ]]; then
echo "Core.SourceGenerators"
elif [[ "$NAMESPACE" == GFramework.Core.Abstractions* ]]; then
echo "Core.Abstractions"
elif [[ "$NAMESPACE" == GFramework.Core* ]]; then
echo "Core"
elif [[ "$NAMESPACE" == GFramework.Game.SourceGenerators* ]]; then
echo "Game.SourceGenerators"
elif [[ "$NAMESPACE" == GFramework.Game.Abstractions* ]]; then
echo "Game.Abstractions"
elif [[ "$NAMESPACE" == GFramework.Game* ]]; then
echo "Game"
elif [[ "$NAMESPACE" == GFramework.Godot.SourceGenerators.Abstractions* ]]; then
echo "Godot.SourceGenerators.Abstractions"
elif [[ "$NAMESPACE" == GFramework.Godot.SourceGenerators* ]]; then
echo "Godot.SourceGenerators"
elif [[ "$NAMESPACE" == GFramework.Godot* ]]; then
echo "Godot"
elif [[ "$NAMESPACE" == GFramework.Cqrs.SourceGenerators* ]]; then
echo "Cqrs.SourceGenerators"
elif [[ "$NAMESPACE" == GFramework.Cqrs.Abstractions* ]]; then
echo "Cqrs.Abstractions"
elif [[ "$NAMESPACE" == GFramework.Cqrs* ]]; then
echo "Cqrs"
elif [[ "$NAMESPACE" == GFramework.Ecs.Arch.Abstractions* ]]; then
echo "Ecs.Arch.Abstractions"
elif [[ "$NAMESPACE" == GFramework.Ecs.Arch* ]]; then
echo "Ecs.Arch"
elif [[ "$NAMESPACE" == GFramework.SourceGenerators.Common* ]]; then
echo "SourceGenerators.Common"
else
return 1
fi
}

View File

@ -0,0 +1,434 @@
{
"version": 1,
"description": "Canonical documentation refresh module map for GFramework skills.",
"modules": {
"Core": {
"aliases": ["core", "core-runtime", "runtime-core", "core module"],
"source_paths": ["GFramework.Core"],
"project_file": "GFramework.Core/GFramework.Core.csproj",
"test_projects": ["GFramework.Core.Tests/GFramework.Core.Tests.csproj"],
"readme_paths": ["GFramework.Core/README.md"],
"docs": {
"landing": ["docs/zh-CN/core/index.md"],
"topics": [
"docs/zh-CN/core/architecture.md",
"docs/zh-CN/core/context.md",
"docs/zh-CN/core/lifecycle.md",
"docs/zh-CN/core/events.md",
"docs/zh-CN/core/property.md",
"docs/zh-CN/core/logging.md",
"docs/zh-CN/core/state-management.md",
"docs/zh-CN/core/coroutine.md"
],
"fallback": [
"docs/zh-CN/getting-started/quick-start.md",
"docs/zh-CN/api-reference/index.md"
]
},
"ai_libs": {
"paths": [
"ai-libs/CoreGrid/CoreGrid.csproj",
"ai-libs/CoreGrid/global",
"ai-libs/CoreGrid/docs"
],
"search_hints": [
"rg -n \"Architecture|RegisterModel|RegisterSystem|BindableProperty|EventBus\" ai-libs/CoreGrid"
]
}
},
"Core.Abstractions": {
"aliases": ["core.abstractions", "core-abstractions", "core abstractions"],
"source_paths": ["GFramework.Core.Abstractions"],
"project_file": "GFramework.Core.Abstractions/GFramework.Core.Abstractions.csproj",
"test_projects": ["GFramework.Core.Tests/GFramework.Core.Tests.csproj"],
"readme_paths": ["GFramework.Core.Abstractions/README.md"],
"docs": {
"landing": ["docs/zh-CN/abstractions/core-abstractions.md"],
"topics": [
"docs/zh-CN/core/index.md",
"docs/zh-CN/core/architecture.md",
"docs/zh-CN/core/context.md"
],
"fallback": ["docs/zh-CN/api-reference/index.md"]
},
"ai_libs": {
"paths": ["ai-libs/CoreGrid/CoreGrid.csproj"],
"search_hints": [
"rg -n \"GFramework\\.Core\\.Abstractions|IArchitecture|IModel|ISystem\" ai-libs/CoreGrid"
]
}
},
"Core.SourceGenerators": {
"aliases": [
"core.sourcegenerators",
"core-sourcegenerators",
"core-source-generators",
"core source generators"
],
"source_paths": ["GFramework.Core.SourceGenerators"],
"project_file": "GFramework.Core.SourceGenerators/GFramework.Core.SourceGenerators.csproj",
"test_projects": ["GFramework.SourceGenerators.Tests/GFramework.SourceGenerators.Tests.csproj"],
"readme_paths": ["GFramework.Core.SourceGenerators/README.md"],
"docs": {
"landing": ["docs/zh-CN/source-generators/index.md"],
"topics": [
"docs/zh-CN/source-generators/context-aware-generator.md",
"docs/zh-CN/source-generators/context-get-generator.md",
"docs/zh-CN/source-generators/priority-generator.md",
"docs/zh-CN/source-generators/logging-generator.md"
],
"fallback": ["docs/zh-CN/api-reference/index.md"]
},
"ai_libs": {
"paths": ["ai-libs/CoreGrid/global", "ai-libs/CoreGrid/scripts"],
"search_hints": [
"rg -n \"ContextAware|ContextGet|Priority|GeneratedLogger|Log\" ai-libs/CoreGrid"
]
}
},
"Core.SourceGenerators.Abstractions": {
"aliases": [
"core.sourcegenerators.abstractions",
"core-source-generators-abstractions",
"core source generators abstractions"
],
"source_paths": ["GFramework.Core.SourceGenerators.Abstractions"],
"project_file": "GFramework.Core.SourceGenerators.Abstractions/GFramework.Core.SourceGenerators.Abstractions.csproj",
"test_projects": ["GFramework.SourceGenerators.Tests/GFramework.SourceGenerators.Tests.csproj"],
"readme_paths": [],
"docs": {
"landing": ["docs/zh-CN/source-generators/index.md"],
"topics": [
"docs/zh-CN/source-generators/context-aware-generator.md",
"docs/zh-CN/source-generators/context-get-generator.md",
"docs/zh-CN/source-generators/priority-generator.md"
],
"fallback": ["docs/zh-CN/api-reference/index.md"]
},
"ai_libs": {
"paths": ["ai-libs/CoreGrid/global"],
"search_hints": [
"rg -n \"GFramework\\.Core\\.SourceGenerators\\.Abstractions|\\[ContextAware\\]|\\[Priority\\]\" ai-libs/CoreGrid"
]
}
},
"Game": {
"aliases": ["game", "game-runtime", "runtime-game", "game module"],
"source_paths": ["GFramework.Game"],
"project_file": "GFramework.Game/GFramework.Game.csproj",
"test_projects": ["GFramework.Game.Tests/GFramework.Game.Tests.csproj"],
"readme_paths": ["GFramework.Game/README.md"],
"docs": {
"landing": ["docs/zh-CN/game/index.md"],
"topics": [
"docs/zh-CN/game/scene.md",
"docs/zh-CN/game/ui.md",
"docs/zh-CN/game/data.md",
"docs/zh-CN/game/storage.md",
"docs/zh-CN/game/serialization.md",
"docs/zh-CN/game/setting.md",
"docs/zh-CN/game/config-system.md"
],
"fallback": [
"docs/zh-CN/getting-started/quick-start.md",
"docs/zh-CN/api-reference/index.md"
]
},
"ai_libs": {
"paths": [
"ai-libs/CoreGrid/global",
"ai-libs/CoreGrid/scenes",
"ai-libs/CoreGrid/addons"
],
"search_hints": [
"rg -n \"SceneRouter|UiRouter|Setting|Storage|Serialization|Config\" ai-libs/CoreGrid"
]
}
},
"Game.Abstractions": {
"aliases": ["game.abstractions", "game-abstractions", "game abstractions"],
"source_paths": ["GFramework.Game.Abstractions"],
"project_file": "GFramework.Game.Abstractions/GFramework.Game.Abstractions.csproj",
"test_projects": ["GFramework.Game.Tests/GFramework.Game.Tests.csproj"],
"readme_paths": ["GFramework.Game.Abstractions/README.md"],
"docs": {
"landing": ["docs/zh-CN/abstractions/game-abstractions.md"],
"topics": [
"docs/zh-CN/game/index.md",
"docs/zh-CN/game/scene.md",
"docs/zh-CN/game/ui.md"
],
"fallback": ["docs/zh-CN/api-reference/index.md"]
},
"ai_libs": {
"paths": ["ai-libs/CoreGrid/global", "ai-libs/CoreGrid/scenes"],
"search_hints": [
"rg -n \"ISceneFactory|ISceneRoot|UiInteractionProfile|IUiRoot\" ai-libs/CoreGrid"
]
}
},
"Game.SourceGenerators": {
"aliases": [
"game.sourcegenerators",
"game-source-generators",
"game source generators"
],
"source_paths": ["GFramework.Game.SourceGenerators"],
"project_file": "GFramework.Game.SourceGenerators/GFramework.Game.SourceGenerators.csproj",
"test_projects": ["GFramework.SourceGenerators.Tests/GFramework.SourceGenerators.Tests.csproj"],
"readme_paths": ["GFramework.Game.SourceGenerators/README.md"],
"docs": {
"landing": ["docs/zh-CN/source-generators/index.md"],
"topics": [
"docs/zh-CN/source-generators/auto-scene-generator.md",
"docs/zh-CN/source-generators/auto-ui-page-generator.md"
],
"fallback": ["docs/zh-CN/game/index.md"]
},
"ai_libs": {
"paths": ["ai-libs/CoreGrid/scenes", "ai-libs/CoreGrid/addons"],
"search_hints": [
"rg -n \"AutoScene|AutoUiPage|SceneRouter|UiRouter\" ai-libs/CoreGrid"
]
}
},
"Godot": {
"aliases": ["godot", "godot-runtime", "runtime-godot", "godot module"],
"source_paths": ["GFramework.Godot"],
"project_file": "GFramework.Godot/GFramework.Godot.csproj",
"test_projects": ["GFramework.Godot.Tests/GFramework.Godot.Tests.csproj"],
"readme_paths": ["GFramework.Godot/README.md"],
"docs": {
"landing": ["docs/zh-CN/godot/index.md"],
"topics": [
"docs/zh-CN/godot/architecture.md",
"docs/zh-CN/godot/scene.md",
"docs/zh-CN/godot/ui.md",
"docs/zh-CN/godot/storage.md",
"docs/zh-CN/godot/setting.md",
"docs/zh-CN/godot/signal.md"
],
"fallback": [
"docs/zh-CN/source-generators/index.md",
"docs/zh-CN/api-reference/index.md"
]
},
"ai_libs": {
"paths": [
"ai-libs/CoreGrid/project.godot",
"ai-libs/CoreGrid/global",
"ai-libs/CoreGrid/scenes"
],
"search_hints": [
"rg -n \"AutoLoad|InputActions|Node|Signal|PackedScene|Godot\" ai-libs/CoreGrid"
]
}
},
"Godot.SourceGenerators": {
"aliases": [
"godot.sourcegenerators",
"godot-source-generators",
"godot source generators",
"godot generators"
],
"source_paths": ["GFramework.Godot.SourceGenerators"],
"project_file": "GFramework.Godot.SourceGenerators/GFramework.Godot.SourceGenerators.csproj",
"test_projects": ["GFramework.Godot.SourceGenerators.Tests/GFramework.Godot.SourceGenerators.Tests.csproj"],
"readme_paths": ["GFramework.Godot.SourceGenerators/README.md"],
"docs": {
"landing": ["docs/zh-CN/source-generators/index.md"],
"topics": [
"docs/zh-CN/source-generators/godot-project-generator.md",
"docs/zh-CN/source-generators/get-node-generator.md",
"docs/zh-CN/source-generators/bind-node-signal-generator.md",
"docs/zh-CN/source-generators/auto-register-exported-collections-generator.md"
],
"fallback": ["docs/zh-CN/godot/index.md"]
},
"ai_libs": {
"paths": [
"ai-libs/CoreGrid/project.godot",
"ai-libs/CoreGrid/global",
"ai-libs/CoreGrid/scenes"
],
"search_hints": [
"rg -n \"GetNode|BindNodeSignal|AutoRegisterExported|project\\.godot|AutoLoad\" ai-libs/CoreGrid"
]
}
},
"Godot.SourceGenerators.Abstractions": {
"aliases": [
"godot.sourcegenerators.abstractions",
"godot-source-generators-abstractions",
"godot source generators abstractions"
],
"source_paths": ["GFramework.Godot.SourceGenerators.Abstractions"],
"project_file": "GFramework.Godot.SourceGenerators.Abstractions/GFramework.Godot.SourceGenerators.Abstractions.csproj",
"test_projects": ["GFramework.Godot.SourceGenerators.Tests/GFramework.Godot.SourceGenerators.Tests.csproj"],
"readme_paths": [],
"docs": {
"landing": ["docs/zh-CN/source-generators/index.md"],
"topics": [
"docs/zh-CN/source-generators/godot-project-generator.md",
"docs/zh-CN/source-generators/get-node-generator.md",
"docs/zh-CN/source-generators/bind-node-signal-generator.md"
],
"fallback": ["docs/zh-CN/godot/index.md"]
},
"ai_libs": {
"paths": ["ai-libs/CoreGrid/project.godot", "ai-libs/CoreGrid/global"],
"search_hints": [
"rg -n \"GFramework\\.Godot\\.SourceGenerators\\.Abstractions|GetNode|BindNodeSignal\" ai-libs/CoreGrid"
]
}
},
"Cqrs": {
"aliases": ["cqrs", "mediator", "cqrs module"],
"source_paths": ["GFramework.Cqrs"],
"project_file": "GFramework.Cqrs/GFramework.Cqrs.csproj",
"test_projects": ["GFramework.Cqrs.Tests/GFramework.Cqrs.Tests.csproj"],
"readme_paths": ["GFramework.Cqrs/README.md"],
"docs": {
"landing": ["docs/zh-CN/core/cqrs.md"],
"topics": [
"docs/zh-CN/core/command.md",
"docs/zh-CN/core/query.md",
"docs/zh-CN/core/cqrs.md"
],
"fallback": [
"docs/zh-CN/core/index.md",
"docs/zh-CN/api-reference/index.md"
]
},
"ai_libs": {
"paths": ["ai-libs/CoreGrid/global", "ai-libs/CoreGrid/scripts"],
"search_hints": [
"rg -n \"CommandHandler|QueryHandler|RegisterCqrs|PipelineBehavior\" ai-libs/CoreGrid"
]
}
},
"Cqrs.Abstractions": {
"aliases": ["cqrs.abstractions", "cqrs-abstractions", "cqrs abstractions"],
"source_paths": ["GFramework.Cqrs.Abstractions"],
"project_file": "GFramework.Cqrs.Abstractions/GFramework.Cqrs.Abstractions.csproj",
"test_projects": ["GFramework.Cqrs.Tests/GFramework.Cqrs.Tests.csproj"],
"readme_paths": ["GFramework.Cqrs.Abstractions/README.md"],
"docs": {
"landing": ["docs/zh-CN/core/cqrs.md"],
"topics": [
"docs/zh-CN/core/command.md",
"docs/zh-CN/core/query.md"
],
"fallback": ["docs/zh-CN/api-reference/index.md"]
},
"ai_libs": {
"paths": ["ai-libs/CoreGrid/global"],
"search_hints": [
"rg -n \"GFramework\\.Cqrs\\.Abstractions|ICommand|IQuery|IRequest\" ai-libs/CoreGrid"
]
}
},
"Cqrs.SourceGenerators": {
"aliases": [
"cqrs.sourcegenerators",
"cqrs-source-generators",
"cqrs source generators"
],
"source_paths": ["GFramework.Cqrs.SourceGenerators"],
"project_file": "GFramework.Cqrs.SourceGenerators/GFramework.Cqrs.SourceGenerators.csproj",
"test_projects": ["GFramework.SourceGenerators.Tests/GFramework.SourceGenerators.Tests.csproj"],
"readme_paths": ["GFramework.Cqrs.SourceGenerators/README.md"],
"docs": {
"landing": ["docs/zh-CN/source-generators/index.md"],
"topics": [],
"fallback": [
"docs/zh-CN/core/cqrs.md",
"docs/zh-CN/api-reference/index.md"
]
},
"ai_libs": {
"paths": ["ai-libs/CoreGrid/global"],
"search_hints": [
"rg -n \"GFramework\\.Cqrs\\.SourceGenerators|RequestHandler|PipelineBehavior\" ai-libs/CoreGrid"
]
}
},
"Ecs.Arch": {
"aliases": ["ecs.arch", "ecs-arch", "ecs arch", "ecs"],
"source_paths": ["GFramework.Ecs.Arch"],
"project_file": "GFramework.Ecs.Arch/GFramework.Ecs.Arch.csproj",
"test_projects": ["GFramework.Ecs.Arch.Tests/GFramework.Ecs.Arch.Tests.csproj"],
"readme_paths": ["GFramework.Ecs.Arch/README.md"],
"docs": {
"landing": ["docs/zh-CN/ecs/index.md"],
"topics": ["docs/zh-CN/ecs/arch.md"],
"fallback": [
"docs/zh-CN/core/index.md",
"docs/zh-CN/api-reference/index.md"
]
},
"ai_libs": {
"paths": ["ai-libs/CoreGrid/scripts", "ai-libs/CoreGrid/global"],
"search_hints": [
"rg -n \"Arch\\.Core|World|SystemGroup|QueryDescription\" ai-libs/CoreGrid"
]
}
},
"Ecs.Arch.Abstractions": {
"aliases": [
"ecs.arch.abstractions",
"ecs-arch-abstractions",
"ecs arch abstractions"
],
"source_paths": ["GFramework.Ecs.Arch.Abstractions"],
"project_file": "GFramework.Ecs.Arch.Abstractions/GFramework.Ecs.Arch.Abstractions.csproj",
"test_projects": ["GFramework.Ecs.Arch.Tests/GFramework.Ecs.Arch.Tests.csproj"],
"readme_paths": [],
"docs": {
"landing": ["docs/zh-CN/ecs/index.md"],
"topics": ["docs/zh-CN/ecs/arch.md"],
"fallback": ["docs/zh-CN/api-reference/index.md"]
},
"ai_libs": {
"paths": ["ai-libs/CoreGrid/scripts"],
"search_hints": [
"rg -n \"GFramework\\.Ecs\\.Arch\\.Abstractions|IArchSystem|IArchModel\" ai-libs/CoreGrid"
]
}
},
"SourceGenerators.Common": {
"aliases": [
"sourcegenerators.common",
"source-generators-common",
"source generators common"
],
"source_paths": ["GFramework.SourceGenerators.Common"],
"project_file": "GFramework.SourceGenerators.Common/GFramework.SourceGenerators.Common.csproj",
"test_projects": ["GFramework.SourceGenerators.Tests/GFramework.SourceGenerators.Tests.csproj"],
"readme_paths": [],
"docs": {
"landing": ["docs/zh-CN/source-generators/index.md"],
"topics": [],
"fallback": ["docs/zh-CN/api-reference/index.md"]
},
"ai_libs": {
"paths": [],
"search_hints": []
}
}
},
"docs_section_aliases": {
"core": ["Core"],
"abstractions": ["Core.Abstractions", "Game.Abstractions", "Ecs.Arch.Abstractions"],
"game": ["Game"],
"godot": ["Godot"],
"cqrs": ["Cqrs"],
"ecs": ["Ecs.Arch"],
"source-generators": [
"Core.SourceGenerators",
"Game.SourceGenerators",
"Cqrs.SourceGenerators",
"Godot.SourceGenerators"
]
}
}

View File

@ -0,0 +1,180 @@
---
name: gframework-batch-boot
description: Repository-specific bulk-task workflow for the GFramework repo. Use when Codex should start from the normal GFramework boot context and then continue a repetitive or large-scope task in automatic batches without waiting for manual round-by-round prompts, especially for analyzer warning cleanup, repetitive test refactors, documentation waves, or similar multi-file work with an explicit stop condition such as changed-file count, warning count, or timebox.
---
# GFramework Batch Boot
## Overview
Use this skill when `gframework-boot` is necessary but not sufficient because the task should keep advancing in bounded
batches until a clear stop condition is met.
Treat `AGENTS.md` as the source of truth. This skill extends `gframework-boot`; it does not replace it.
## Startup Workflow
1. Execute the normal `gframework-boot` startup sequence first:
- read `AGENTS.md`
- read `.ai/environment/tools.ai.yaml`
- read `ai-plan/public/README.md`
- read the mapped active topic `todos/` and `traces/`
2. Classify the task as a batch candidate only if all of the following are true:
- the work is repetitive, sliceable, or likely to require multiple similar iterations
- each batch can be given an explicit ownership boundary
- a stop condition can be measured locally
3. Before any delegation, define the batch objective in one sentence:
- warning family reduction
- repeated test refactor pattern
- module-by-module documentation refresh
- other repetitive multi-file cleanup
## Baseline Selection
When the stop condition depends on branch size or changed-file count, choose the baseline carefully.
1. Prefer the freshest remote-tracking reference that already exists locally:
- `origin/main`
- or the mapped upstream base branch for the current topic
2. Do not default to local `main` when `refs/heads/main` is behind `refs/remotes/origin/main`.
3. If both local and remote-tracking refs exist, report:
- ref name
- short SHA
- committer date
4. If only a local branch exists, state that the baseline may be stale before using it.
5. When the task is tied to a PR or topic branch rather than `main`, prefer that explicit upstream comparison target over
a generic `main`.
For changed-file limits, measure branch-wide scope against the chosen baseline, not just the current working tree:
- use `git diff --name-only <baseline>...HEAD`
- do not confuse branch diff size with `git status --short`
For changed-line limits, also measure branch-wide scope against the chosen baseline:
- prefer `git diff --numstat <baseline>...HEAD`
- treat "changed lines" as `added + deleted` summed across the branch diff
- do not use working-tree-only line counts as a substitute for branch-wide scope
For shorthand numeric thresholds, use a fixed default baseline:
- compare the current branch's cumulative diff against remote `origin/main`
- include all commits reachable from `HEAD` that are not already in `origin/main`
- do not reinterpret shorthand thresholds as "this batch only" or "current unstaged changes only"
- only use another baseline when the user explicitly names it in the prompt
## Stop Conditions
Choose one primary stop condition before the first batch and restate it to the user.
Common stop conditions:
- branch diff vs baseline approaches a file-count threshold
- warnings-only build reaches a target count
- a specific hotspot list is exhausted
- a timebox or validation budget is reached
If multiple stop conditions exist, rank them and treat one as primary.
## Shorthand Stop-Condition Syntax
`gframework-batch-boot` may be invoked with shorthand numeric thresholds when the user clearly wants a branch-size stop
condition instead of a long natural-language prompt.
Interpret shorthand as follows:
- `$gframework-batch-boot 75`
- means: stop when the current branch's cumulative diff vs remote `origin/main` approaches `75` changed files
- `$gframework-batch-boot 75 2000`
- means: stop when the current branch's cumulative diff vs remote `origin/main` approaches `75` changed files OR
`2000` changed lines
- default positional meaning is `<files> <lines>`
- `$gframework-batch-boot 75 | 2000`
- may be interpreted as the same OR shorthand in plain-language chat
- when restating, planning, or documenting the command, normalize it to `$gframework-batch-boot 75 2000`
- prefer the no-pipe form because `|` is easy to confuse with a shell pipeline
When shorthand is used:
- report the resolved thresholds explicitly before the first batch
- report that the baseline is remote `origin/main`, unless the user explicitly overrides it
- if two numeric thresholds are present, treat file count as the default primary metric for status reporting unless the
user says otherwise
- stop when either threshold is reached or exceeded, even if the other threshold still has headroom
## Batch Loop
1. Inspect the current state before the first batch:
- current branch and active topic
- selected baseline
- current stop-condition metric
- next candidate slices
2. Keep the critical path local.
3. Delegate only bounded slices with explicit ownership:
- one file
- one warning family within one project
- one module documentation wave
4. For each worker batch, specify:
- objective
- owned files or subsystem
- required validation commands
- output format
- reminder that other agents may be editing the repo
5. While workers run, use the main thread for non-overlapping tasks:
- queue the next candidate slice
- inspect the next hotspot
- recompute branch size or warning distribution
6. After each completed batch:
- integrate or verify the result
- rerun the required validation
- recompute the primary stop-condition metric
- decide immediately whether to continue or stop
7. Do not require the user to manually trigger every round unless:
- the next slice is ambiguous
- a validation failure changes strategy
- the batch objective conflicts with the active topic
## Task Tracking
For multi-batch work, keep recovery artifacts current.
- Update the active `ai-plan/public/<topic>/todos/` document when a meaningful batch lands.
- Update the matching `traces/` document with:
- accepted delegated scope
- validation milestones
- current stop-condition metric
- next recommended batch
- Keep the active recovery point concise; archive detailed history when it starts to sprawl.
## Delegation Defaults
- Prefer `worker` subagents for independent write slices.
- Prefer `explorer` subagents for read-only hotspot ranking or next-batch discovery.
- Keep each worker ownership boundary disjoint.
- Avoid launching a new batch when the expected write set would push the branch beyond the declared threshold without a
deliberate decision.
## Completion
Stop the loop when any of the following becomes true:
- the primary stop condition has been reached or exceeded
- the remaining slices are no longer low-risk
- validation failures indicate the task is no longer repetitive
- the branch has grown large enough that reviewability would materially degrade
When stopping, report:
- which baseline was used
- the exact metric value at stop time
- completed batches
- remaining candidate batches
- whether further work should continue in a new turn or after rebasing/fetching
## Example Triggers
- `Use $gframework-batch-boot 75 to keep reducing analyzer warnings until the branch diff vs baseline approaches 75 files.`
- `Use $gframework-batch-boot 75 2000 to keep reducing warnings until the branch diff approaches 75 files or 2000 changed lines.`
- `Use $gframework-batch-boot and keep reducing analyzer warnings until the branch diff vs origin/main approaches 75 files.`
- `Use $gframework-batch-boot to continue this repetitive test refactor in bounded batches until the warning count drops below 10.`
- `Use $gframework-batch-boot and refresh module docs in waves without asking me to trigger every round.`

View File

@ -0,0 +1,4 @@
interface:
display_name: "GFramework Batch Boot"
short_description: "Run boot, then iterate bounded bulk batches"
default_prompt: "Use $gframework-batch-boot to start from the normal GFramework boot context and continue the current repetitive task in automatic bounded batches until the declared stop condition is reached."

View File

@ -0,0 +1,82 @@
---
name: gframework-boot
description: Repository-specific boot workflow for the GFramework repo. Use when Codex needs to start or resume work in this repository from short prompts such as "boot", "continue", "read AGENTS", or "start the next step"; when the user expects Codex to first read AGENTS.md, .ai/environment/tools.ai.yaml, and public ai-plan tracking files; or when Codex should assess task complexity, decide whether explorer or worker subagents are warranted, and then proceed under the repository's workflow rules.
---
# GFramework Boot
## Overview
Use this skill to bootstrap work in the GFramework repository with minimal user prompting.
Treat `AGENTS.md` as the source of truth. Use this skill to enforce a startup sequence, not to replace repository rules.
## Startup Workflow
1. Read `AGENTS.md` before choosing tools, planning edits, or delegating work.
2. Read `.ai/environment/tools.ai.yaml` to confirm the preferred local toolchain.
3. Read `ai-plan/public/README.md` before asking the user for missing context.
4. If `ai-plan/public/README.md` maps the current branch or worktree to active topics, inspect those topics'
`todos/` and `traces/` directories in listed priority order.
5. If no mapping exists, scan `ai-plan/public/<topic>/todos/` and `ai-plan/public/<topic>/traces/` across active
topics, and ignore `ai-plan/public/archive/` unless the user explicitly asks for historical context.
6. Treat `ai-plan/public/<topic>/archive/` as secondary context even for active topics; only read it when the active
todo/trace files point there or when the user explicitly asks for historical detail.
7. If `ai-plan/private/<branch-or-worktree>/` exists and is relevant, treat it as private recovery context for the
current worktree only and do not assume it should be committed.
8. Classify the task state:
- `new`: no matching recovery document exists, or the user is clearly starting fresh work
- `resume`: a matching todo or trace exists and the user is continuing that thread
- `recovery`: prior work looks partial, interrupted, or ambiguous and the next safe recovery point must be reconstructed
9. Choose the best matching `ai-plan` artifacts:
- Prefer topics explicitly mapped from `ai-plan/public/README.md`
- Prefer path names or headings that match the user's task wording
- Break ties by most recently updated trace or todo
- If ambiguity would materially change implementation, summarize the candidates and ask one concise question
10. Classify the task complexity before deciding on subagents:
- `simple`: one concern, one file or module, no parallel discovery required
- `medium`: a small number of modules, some read-only exploration helpful, critical path still easy to keep local
- `complex`: cross-module design, migration, large refactor, or work likely to exceed one context window
11. Apply the delegation policy from `AGENTS.md`:
- Keep the critical path local
- Use `explorer` with `gpt-5.1-codex-mini` for narrow read-only questions, tracing, inventory, and comparisons
- Use `worker` with `gpt-5.4` only for bounded implementation tasks with explicit ownership
- Do not delegate purely for ceremony; delegate only when it materially shortens the task or controls context growth
12. Before editing files, tell the user what you read, how you classified the task, whether subagents will be used,
and the first implementation step.
13. Proceed with execution, validation, and documentation updates required by `AGENTS.md`.
## Task Tracking
For multi-step, cross-module, or interruption-prone work, maintain the repository recovery artifacts instead of keeping state only in chat.
- Update `ai-plan/public/README.md` whenever the active topic set or worktree mapping changes.
- Update the active public document under `ai-plan/public/<topic>/todos/` with completed work, validation results,
risks, and the next recovery point.
- Update the matching public trace under `ai-plan/public/<topic>/traces/` with key decisions, delegated scope, and the
immediate next step.
- Keep the active todo/trace files concise enough for `boot` to use as default entrypoints. When completed, validated
stages start piling up, move their detailed history into `ai-plan/public/<topic>/archive/` and leave archive
pointers in the active files.
- Move stage-complete artifacts into `ai-plan/public/<topic>/archive/`, and move completed topics into
`ai-plan/public/archive/<topic>/` so `boot` does not keep reloading stale context.
- Keep worktree-private scratch recovery files under `ai-plan/private/` and do not treat them as commit targets.
- Never write secrets, machine-specific paths, or other sensitive environment details into any `ai-plan/**` artifact.
- If the task is clearly complex and no recovery artifact exists yet, create one before substantive edits.
## Recovery Heuristics
- If the user says `next step`, `continue`, `继续`, or similar resume language, read `ai-plan/public/README.md`
first, then search the mapped active topics before scanning the broader public area.
- If the current branch and the mapped active topics describe the same feature area, prefer resuming those topics first.
- If the repository state suggests in-flight work but no recovery document matches, reconstruct the safest next step from code, tests, and Git state before asking the user for clarification.
## Example Triggers
- `boot`
- `Use $gframework-boot and continue the current task`
- `Read AGENTS and public ai-plan, then start the next step`
- `继续当前任务,先看 AGENTS.md 和 public ai-plan`
## References
Read `references/startup-artifacts.md` when you need a quick reminder of the repository entrypoints, task-state heuristics, or delegation defaults without re-reading the entire skill.

View File

@ -0,0 +1,4 @@
interface:
display_name: "GFramework Boot"
short_description: "Bootstrap GFramework repository tasks"
default_prompt: "Use $gframework-boot to start or resume work in this GFramework repository."

View File

@ -0,0 +1,38 @@
# Startup Artifacts
## Required Reads
- `AGENTS.md`
- `.ai/environment/tools.ai.yaml`
- `ai-plan/public/README.md`
- the selected `ai-plan/public/<topic>/todos/` directories
- the selected `ai-plan/public/<topic>/traces/` directories
## AI-Plan Selection Heuristics
- Match the current branch or worktree against `ai-plan/public/README.md` first.
- If the index maps the current worktree to topics, inspect those topics in listed order before scanning anything else.
- Match the user's wording against public todo and trace file names next.
- Prefer the newest matching trace when several candidates describe the same feature area.
- If one file records a clearer recovery point than a newer but vague file, prefer the clearer recovery point.
- Ignore `ai-plan/public/archive/**` unless the user explicitly requests historical recovery context.
- Even inside an active topic, prefer the root `todos/` and `traces/` entry files first; only read `archive/` when the
active files point there or when the user asks for historical detail.
- If a matching `ai-plan/private/<branch-or-worktree>/` directory exists, use it only as private context for the current worktree.
## Complexity Defaults
- `simple`: keep everything local, no subagent
- `medium`: keep design local, optionally use one `explorer` for parallel read-only discovery
- `complex`: keep architecture and integration local, delegate only bounded non-blocking subtasks
## Model Defaults
- `explorer`: `gpt-5.1-codex-mini`
- `worker`: `gpt-5.4`
## Startup Summary Template
Use a short update before execution:
`Read AGENTS.md, the environment inventory, ai-plan/public/README.md, and the relevant public ai-plan artifacts. This looks like a <task-state> <complexity> task. I will <delegate-or-not> and start with <first-step>.`

View File

@ -0,0 +1,218 @@
---
name: gframework-doc-refresh
description: "Refresh or reassess GFramework documentation for a source module such as Core, Game, Godot, Cqrs, Ecs.Arch, or their generator/abstraction packages. Use this when the user asks to update module docs, re-evaluate landing pages, fix outdated topic pages, refresh API reference coverage, verify adoption paths against source/tests/README, or compare current docs with ai-libs consumer wiring. Recommended command: /gframework-doc-refresh <module>."
---
# Purpose
Use this skill to refresh GFramework documentation from source-first evidence.
The public entry is module-driven, not doc-type-driven:
- Input: a source module or a resolvable docs section alias
- Output: the minimal documentation update set needed for that module
- Evidence: code, tests, README, current docs, then `ai-libs/`
Do not start by deciding “this is an API doc task” or “this is a tutorial task”.
Decide that only after the module scan.
# Triggers
Use this skill when the user asks things like:
- `refresh docs for Core`
- `update Game module docs`
- `根据 Godot 模块源码刷新文档`
- `重新评估 Cqrs 模块文档并更新`
- `核对 Godot.SourceGenerators 的文档状态`
- `看看 source-generators 栏目哪些页面已经失真`
Recommended command form:
```bash
/gframework-doc-refresh <module>
```
# Supported Modules
Canonical module names:
- `Core`
- `Core.Abstractions`
- `Core.SourceGenerators`
- `Core.SourceGenerators.Abstractions`
- `Game`
- `Game.Abstractions`
- `Game.SourceGenerators`
- `Godot`
- `Godot.SourceGenerators`
- `Godot.SourceGenerators.Abstractions`
- `Cqrs`
- `Cqrs.Abstractions`
- `Cqrs.SourceGenerators`
- `Ecs.Arch`
- `Ecs.Arch.Abstractions`
- `SourceGenerators.Common`
The canonical mapping lives in `.agents/skills/_shared/module-map.json`.
If the user supplies a docs section name:
- resolve it back to a source module first
- if it maps to multiple modules, stop at normalization guidance and do not draft docs yet
# Workflow
## 1. Normalize the input
Run:
```bash
python3 .agents/skills/gframework-doc-refresh/scripts/scan_module_evidence.py <module>
```
The script normalizes aliases, reports ambiguity, and prints the module's evidence surface.
If the result is ambiguous:
- return the candidate modules
- ask the user to pick the intended source module
- do not continue into document generation
## 2. Scan the evidence surface
For the resolved module, inspect:
- source directories
- `*.csproj`
- relevant test projects
- sibling `README.md`
- mapped `docs/zh-CN` landing pages and topic pages
- optional `ai-libs/` consumer evidence when needed
Always confirm the actual files in the repository.
Do not assume the mapping is enough on its own.
## 3. Decide whether `ai-libs/` is needed
Use `ai-libs/` when:
- adoption path is unclear from source and README alone
- extension points need a real consumer wiring example
- current docs have concepts but lack an end-to-end integration path
Do not rely on `ai-libs/` for:
- public API contract definitions
- generator diagnostics or semantic guarantees
- claims about what the current version officially supports
If `ai-libs/` conflicts with current source or tests, keep source/tests as the contract and document the migration boundary.
## 4. Judge the documentation state
Classify the module into one or more of these states:
- missing landing page
- stale landing page
- stale topic page
- missing or stale API reference coverage
- stale tutorial/example
- validation-only
Base this on evidence, not on the previous docs shape.
## 5. Choose the output set
Always prioritize:
1. README / landing page / adoption path
2. topic pages
3. API reference
4. tutorials
If the module only needs validation or relinking, do not generate extra pages.
## 6. Draft or update docs
Load only the template that matches the output you selected:
- `templates/module-landing.md`
- `templates/topic-refresh.md`
- `templates/api-reference.md`
- `templates/tutorial.md`
Keep examples minimal, current, and traceable to source or tests.
## 7. Validate
Run the internal validators as needed:
```bash
bash .agents/skills/gframework-doc-refresh/scripts/validate-all.sh <file-or-directory>
```
For site-level confirmation after doc edits:
```bash
cd docs && bun run build
```
# Evidence Order
Use this exact priority:
1. source code, XML docs, `*.csproj`
2. tests and snapshots
3. module `README.md`
4. current `docs/zh-CN` pages
5. verified `ai-libs/` consumers
6. archived docs only as fallback context
# Output Rules
- Prefer correcting the adoption path over expanding page count.
- Do not copy wording from outdated docs just to keep page volume.
- Public docs must stay reader-facing. Do not write inventory, coverage baseline, recovery-point, batch-metric, review
backlog, or audit-wave wording into `README.md` or `docs/**`.
- Use neutral, destination-first section names and link labels. Do not expose raw filenames or paths such as
`game/index.md`, `README.md`, or `../core/cqrs.md` as visible reader-facing labels when a semantic label is
available.
- Do not use rhetorical or conversational headings in public docs, such as “你真正会用到的公开入口”、
“先理解包关系” or “想看……转到……”. Prefer direct labels such as “公开入口”、
“模块与包关系” and “相关主题”.
- Keep public docs out of internal product-decision tone. Do not publish repository-governance wording such as
“当前阶段的结论”、“不建议立即启动” or audience-maintainer tradeoff discussions unless the page itself is a public
adoption guide and the wording has been rewritten as reader-facing suitability guidance.
- If XML or audit evidence is relevant, translate it into reader guidance such as “which types to inspect first” or
“which entry points define the contract”, instead of exposing counts, dates, or governance status.
- Escape generics outside code blocks.
- Keep internal links real and current.
- Mark code blocks with explicit languages.
- Use the smallest example that demonstrates the current contract.
- Consumer examples may align with `ai-libs/`, but must not exceed the current module contract.
# Validation
Use the shared standards in `.agents/skills/_shared/DOCUMENTATION_STANDARDS.md`.
When this skill changes public docs, prefer:
1. focused validator on touched pages
2. `cd docs && bun run build`
When this skill changes the skill system itself:
1. validate `SKILL.md` frontmatter exists
2. run the module scan script for representative modules
3. confirm obsolete `vitepress-*` public entries are gone
# References
Read these only when needed:
- `.agents/skills/_shared/DOCUMENTATION_STANDARDS.md`
- `.agents/skills/_shared/module-map.json`
- `references/module-selection.md`
- `references/evidence-and-ai-libs.md`
- `references/output-strategy.md`

View File

@ -0,0 +1,4 @@
interface:
display_name: "GFramework Doc Refresh"
short_description: "Refresh module docs from code-first evidence"
default_prompt: "Use $gframework-doc-refresh to refresh a GFramework module's docs from source, tests, README, current docs, and ai-libs evidence."

View File

@ -0,0 +1,35 @@
# Evidence And `ai-libs`
The evidence order is fixed:
1. source code, XML docs, `*.csproj`
2. tests and snapshots
3. module README
4. current `docs/zh-CN`
5. `ai-libs/`
6. archived docs
## When To Use `ai-libs`
Use `ai-libs/` to answer questions like:
- How is this extension point wired in a real project?
- What does the minimal project layout look like?
- Which project-side files need to exist for this module to work end to end?
## When Not To Use `ai-libs`
Do not use `ai-libs/` as the primary source for:
- public API semantics
- exact generator output guarantees
- supported package matrix
- diagnostics behavior
## Conflict Rule
If `ai-libs/` drifts from the current repo:
- trust source and tests
- mention the drift as a compatibility or migration note
- do not document old consumer behavior as if it were still the contract

View File

@ -0,0 +1,29 @@
# Module Selection
Use `.agents/skills/_shared/module-map.json` as the canonical source for:
- supported modules
- aliases
- source paths
- test projects
- README paths
- docs landing/topic/fallback pages
- `ai-libs/` reference roots
Selection rules:
1. Prefer explicit canonical module names.
2. Resolve docs section aliases back to source modules before scanning docs.
3. If an alias maps to multiple modules, stop and return the candidate list.
4. If a module has no dedicated docs section, fall back to the nearest existing landing page or API index instead of inventing a fake section.
Representative ambiguous inputs:
- `source-generators` -> likely one of `Core.SourceGenerators`, `Game.SourceGenerators`, `Cqrs.SourceGenerators`, `Godot.SourceGenerators`
- `abstractions` -> likely one of `Core.Abstractions`, `Game.Abstractions`, `Ecs.Arch.Abstractions`
Representative resolvable aliases:
- `core-abstractions` -> `Core.Abstractions`
- `godot generators` -> `Godot.SourceGenerators`
- `ecs` -> `Ecs.Arch`

View File

@ -0,0 +1,38 @@
# Output Strategy
The module scan determines the document type.
Use this priority:
1. fix README / landing page / adoption path
2. fix stale topic pages
3. add or refresh API reference coverage
4. add or refresh tutorials
## Landing Page Checklist
- module purpose
- package relationship
- minimum adoption path
- real entry points
- next-reading links
## Topic Page Checklist
- current role
- public entry points
- minimum example
- compatibility or migration boundary
- related pages
## API Reference Checklist
- only for types or members that materially help consumers
- grounded in XML docs and source
- no speculative examples
## Tutorial Checklist
- only after the landing path is accurate
- keep the scenario traceable to source/tests or `ai-libs/`
- explain why each step exists, not just the code shape

View File

@ -0,0 +1,226 @@
#!/usr/bin/env python3
"""Normalize a GFramework docs module input and report its evidence surface."""
from __future__ import annotations
import argparse
import json
import sys
from pathlib import Path
from typing import Any
SCRIPT_DIR = Path(__file__).resolve().parent
REPO_ROOT = SCRIPT_DIR.parents[3]
MODULE_MAP_PATH = REPO_ROOT / ".agents/skills/_shared/module-map.json"
def load_module_map() -> dict[str, Any]:
return json.loads(MODULE_MAP_PATH.read_text(encoding="utf-8"))
def normalize_key(value: str) -> str:
return value.strip().lower().replace("_", "-").replace(" ", "-")
def resolve_module(raw_input: str, module_map: dict[str, Any]) -> dict[str, Any]:
modules = module_map["modules"]
docs_section_aliases = module_map.get("docs_section_aliases", {})
normalized = normalize_key(raw_input)
for canonical_name in modules:
if normalize_key(canonical_name) == normalized:
return {"status": "ok", "module": canonical_name, "reason": "canonical"}
for canonical_name, config in modules.items():
aliases = config.get("aliases", [])
if normalized in {normalize_key(alias) for alias in aliases}:
return {"status": "ok", "module": canonical_name, "reason": "alias"}
if normalized in docs_section_aliases:
candidates = docs_section_aliases[normalized]
if len(candidates) == 1:
return {"status": "ok", "module": candidates[0], "reason": "docs_section"}
return {
"status": "ambiguous",
"reason": "docs_section",
"input": raw_input,
"candidates": candidates,
}
fuzzy = [
canonical_name
for canonical_name in modules
if normalized in normalize_key(canonical_name) or normalize_key(canonical_name) in normalized
]
if fuzzy:
return {"status": "unknown", "reason": "closest_match", "input": raw_input, "candidates": fuzzy}
return {"status": "unknown", "reason": "no_match", "input": raw_input, "candidates": []}
def collect_path_state(paths: list[str]) -> list[dict[str, Any]]:
states: list[dict[str, Any]] = []
for relative_path in paths:
absolute_path = REPO_ROOT / relative_path
states.append(
{
"path": relative_path,
"exists": absolute_path.exists(),
"kind": "dir" if absolute_path.is_dir() else "file",
}
)
return states
def assess_docs(module_config: dict[str, Any]) -> list[str]:
docs_config = module_config["docs"]
landing = collect_path_state(docs_config.get("landing", []))
topics = collect_path_state(docs_config.get("topics", []))
assessment: list[str] = []
if landing and not any(item["exists"] for item in landing):
assessment.append("landing_missing")
elif landing:
assessment.append("landing_present")
if not topics:
assessment.append("topic_docs_not_mapped")
else:
existing_topics = sum(1 for item in topics if item["exists"])
if existing_topics == 0:
assessment.append("topic_docs_missing")
elif existing_topics < len(topics):
assessment.append("topic_docs_partial")
else:
assessment.append("topic_docs_present")
return assessment
def build_report(module_name: str, module_config: dict[str, Any]) -> dict[str, Any]:
source_paths = collect_path_state(module_config.get("source_paths", []))
test_projects = collect_path_state(module_config.get("test_projects", []))
readmes = collect_path_state(module_config.get("readme_paths", []))
docs_config = module_config["docs"]
ai_libs = module_config.get("ai_libs", {})
report = {
"status": "ok",
"module": module_name,
"source_paths": source_paths,
"project_file": collect_path_state([module_config["project_file"]])[0],
"test_projects": test_projects,
"readme_paths": readmes,
"docs": {
"landing": collect_path_state(docs_config.get("landing", [])),
"topics": collect_path_state(docs_config.get("topics", [])),
"fallback": collect_path_state(docs_config.get("fallback", []))
},
"ai_libs": {
"paths": collect_path_state(ai_libs.get("paths", [])),
"search_hints": ai_libs.get("search_hints", []),
},
"assessment": assess_docs(module_config),
}
if readmes and not any(item["exists"] for item in readmes):
report["assessment"].append("readme_missing")
if test_projects and not any(item["exists"] for item in test_projects):
report["assessment"].append("tests_missing")
if not ai_libs.get("paths"):
report["assessment"].append("ai_libs_optional")
if not docs_config.get("topics"):
report["assessment"].append("fallback_docs_only")
return report
def print_text_report(report: dict[str, Any]) -> None:
if report["status"] != "ok":
print(json.dumps(report, ensure_ascii=False, indent=2))
return
print(f"module: {report['module']}")
print("assessment:")
for item in report["assessment"]:
print(f" - {item}")
print("source:")
for item in report["source_paths"]:
print(f" - {'OK' if item['exists'] else 'MISS'} {item['path']}")
project_file = report["project_file"]
print(f"project: {'OK' if project_file['exists'] else 'MISS'} {project_file['path']}")
print("tests:")
for item in report["test_projects"]:
print(f" - {'OK' if item['exists'] else 'MISS'} {item['path']}")
print("readme:")
if report["readme_paths"]:
for item in report["readme_paths"]:
print(f" - {'OK' if item['exists'] else 'MISS'} {item['path']}")
else:
print(" - none mapped")
print("docs landing:")
for item in report["docs"]["landing"]:
print(f" - {'OK' if item['exists'] else 'MISS'} {item['path']}")
print("docs topics:")
if report["docs"]["topics"]:
for item in report["docs"]["topics"]:
print(f" - {'OK' if item['exists'] else 'MISS'} {item['path']}")
else:
print(" - none mapped")
print("docs fallback:")
for item in report["docs"]["fallback"]:
print(f" - {'OK' if item['exists'] else 'MISS'} {item['path']}")
print("ai-libs:")
if report["ai_libs"]["paths"]:
for item in report["ai_libs"]["paths"]:
print(f" - {'OK' if item['exists'] else 'MISS'} {item['path']}")
else:
print(" - none mapped")
if report["ai_libs"]["search_hints"]:
print("ai-libs search hints:")
for item in report["ai_libs"]["search_hints"]:
print(f" - {item}")
def main() -> int:
parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument("module", help="Canonical module name, alias, or docs section name.")
parser.add_argument("--json", action="store_true", help="Emit JSON instead of text.")
args = parser.parse_args()
module_map = load_module_map()
resolution = resolve_module(args.module, module_map)
if resolution["status"] != "ok":
if args.json:
print(json.dumps(resolution, ensure_ascii=False, indent=2))
else:
print(json.dumps(resolution, ensure_ascii=False, indent=2))
return 1
report = build_report(resolution["module"], module_map["modules"][resolution["module"]])
report["resolution"] = resolution
if args.json:
print(json.dumps(report, ensure_ascii=False, indent=2))
else:
print_text_report(report)
return 0
if __name__ == "__main__":
sys.exit(main())

View File

@ -0,0 +1,67 @@
#!/bin/bash
# 运行统一文档校验脚本集合。
set -e
TARGET="$1"
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
if [ -z "$TARGET" ]; then
echo "用法: $0 <文件或目录路径>"
exit 1
fi
if [ ! -e "$TARGET" ]; then
echo "错误: 路径不存在: $TARGET"
exit 1
fi
if [ -f "$TARGET" ]; then
FILES=("$TARGET")
else
mapfile -t FILES < <(find "$TARGET" -type f -name "*.md" | sort)
fi
if [ ${#FILES[@]} -eq 0 ]; then
echo "未找到 Markdown 文件"
exit 0
fi
TOTAL_ERRORS=0
FAILED_FILES=0
for FILE in "${FILES[@]}"; do
FILE_ERRORS=0
echo "验证: $FILE"
if ! bash "$SCRIPT_DIR/validate-frontmatter.sh" "$FILE"; then
FILE_ERRORS=$((FILE_ERRORS + 1))
fi
if ! bash "$SCRIPT_DIR/validate-links.sh" "$FILE"; then
FILE_ERRORS=$((FILE_ERRORS + 1))
fi
if ! bash "$SCRIPT_DIR/validate-code-blocks.sh" "$FILE"; then
FILE_ERRORS=$((FILE_ERRORS + 1))
fi
if [ $FILE_ERRORS -eq 0 ]; then
echo "$FILE"
else
echo "$FILE"
FAILED_FILES=$((FAILED_FILES + 1))
fi
TOTAL_ERRORS=$((TOTAL_ERRORS + FILE_ERRORS))
echo ""
done
if [ $TOTAL_ERRORS -eq 0 ]; then
echo "✓ 所有验证通过"
exit 0
fi
echo "✗ 验证失败:$FAILED_FILES 个文件存在问题"
exit 1

View File

@ -0,0 +1,62 @@
#!/bin/bash
# 验证 Markdown 代码块是否闭合并带有语言标记。
set -e
FILE="$1"
if [ -z "$FILE" ]; then
echo "用法: $0 <文件路径>"
exit 1
fi
if [ ! -f "$FILE" ]; then
echo "错误: 文件不存在: $FILE"
exit 1
fi
ERROR_COUNT=0
WARNING_COUNT=0
CODE_FENCE_COUNT=$(grep -c '^```' "$FILE" || true)
if [ $((CODE_FENCE_COUNT % 2)) -ne 0 ]; then
echo "✗ 错误: 存在未闭合的代码块"
ERROR_COUNT=$((ERROR_COUNT + 1))
fi
LINE_NUMBER=0
IN_CODE_BLOCK=0
while IFS= read -r LINE || [ -n "$LINE" ]; do
LINE_NUMBER=$((LINE_NUMBER + 1))
if [[ "$LINE" =~ ^\`\`\`(cs|c#|C#)$ ]]; then
echo "⚠ 警告: 第 $LINE_NUMBER 行使用了非标准 C# 标记,建议改为 csharp"
WARNING_COUNT=$((WARNING_COUNT + 1))
fi
if [[ "$LINE" =~ ^\`\`\` ]]; then
if [ "$IN_CODE_BLOCK" -eq 0 ]; then
if [[ "$LINE" == '```' ]]; then
echo "⚠ 警告: 第 $LINE_NUMBER 行的代码块缺少语言标记"
WARNING_COUNT=$((WARNING_COUNT + 1))
fi
IN_CODE_BLOCK=1
else
IN_CODE_BLOCK=0
fi
fi
done < "$FILE"
if [ $ERROR_COUNT -eq 0 ] && [ $WARNING_COUNT -eq 0 ]; then
echo "✓ 代码块验证通过"
exit 0
fi
if [ $ERROR_COUNT -eq 0 ]; then
echo "⚠ 代码块验证通过,但有 $WARNING_COUNT 个警告"
exit 0
fi
echo "✗ 代码块验证失败($ERROR_COUNT 个错误,$WARNING_COUNT 个警告)"
exit 1

View File

@ -0,0 +1,40 @@
#!/bin/bash
# 验证 Markdown frontmatter。
set -e
FILE="$1"
if [ -z "$FILE" ]; then
echo "用法: $0 <文件路径>"
exit 1
fi
if [ ! -f "$FILE" ]; then
echo "错误: 文件不存在: $FILE"
exit 1
fi
if ! head -n 5 "$FILE" | grep -q "^---$"; then
echo "✗ 错误: 文件缺少 frontmatter"
exit 1
fi
FRONTMATTER=$(sed -n '/^---$/,/^---$/p' "$FILE" | sed '1d;$d')
if [ -z "$FRONTMATTER" ]; then
echo "✗ 错误: frontmatter 为空"
exit 1
fi
if ! echo "$FRONTMATTER" | grep -q "^title:"; then
echo "✗ 错误: 缺少必需字段: title"
exit 1
fi
if ! echo "$FRONTMATTER" | grep -q "^description:"; then
echo "✗ 错误: 缺少必需字段: description"
exit 1
fi
echo "✓ Frontmatter 验证通过"

View File

@ -1,11 +1,9 @@
#!/bin/bash
# 验证内部链接有效性
# 用法: validate-links.sh <文件路径>
# 验证 Markdown 内部链接是否指向当前仓库中的真实页面。
set -e
FILE="$1"
BASE_DIR="docs/zh-CN"
if [ -z "$FILE" ]; then
echo "用法: $0 <文件路径>"
@ -17,58 +15,40 @@ if [ ! -f "$FILE" ]; then
exit 1
fi
echo "验证内部链接: $FILE"
# 获取文件所在目录
FILE_DIR=$(dirname "$FILE")
# 提取所有 Markdown 链接
LINKS=$(grep -oP '\[([^\]]+)\]\(([^)]+)\)' "$FILE" | grep -oP '\(([^)]+)\)' | sed 's/[()]//g' || true)
if [ -z "$LINKS" ]; then
echo "✓ 未找到链接"
echo "✓ 未找到需要验证的链接"
exit 0
fi
ERROR_COUNT=0
while IFS= read -r LINK; do
# 跳过外部链接
if [[ "$LINK" =~ ^https?:// ]]; then
if [[ "$LINK" =~ ^https?:// ]] || [[ "$LINK" =~ ^mailto: ]] || [[ "$LINK" =~ ^# ]]; then
continue
fi
# 跳过锚点链接(仅 #开头)
if [[ "$LINK" =~ ^# ]]; then
continue
fi
# 移除锚点部分
LINK_PATH=$(echo "$LINK" | sed 's/#.*//')
# 跳过空路径
if [ -z "$LINK_PATH" ]; then
continue
fi
# 处理相对路径
if [[ "$LINK_PATH" =~ ^\. ]]; then
TARGET="$FILE_DIR/$LINK_PATH"
# 处理绝对路径
elif [[ "$LINK_PATH" =~ ^/ ]]; then
if [[ "$LINK_PATH" =~ ^/ ]]; then
TARGET="docs$LINK_PATH"
# 如果没有扩展名,尝试添加 .md
if [[ ! "$TARGET" =~ \. ]]; then
if [[ ! "$TARGET" =~ \.[A-Za-z0-9]+$ ]]; then
TARGET="$TARGET.md"
fi
elif [[ "$LINK_PATH" =~ ^\. ]]; then
TARGET="$FILE_DIR/$LINK_PATH"
else
TARGET="$FILE_DIR/$LINK_PATH"
fi
# 规范化路径
TARGET=$(realpath -m "$TARGET" 2>/dev/null || echo "$TARGET")
# 检查文件是否存在
if [ ! -f "$TARGET" ] && [ ! -d "$TARGET" ]; then
echo "✗ 损坏的链接: $LINK"
echo " 目标不存在: $TARGET"
@ -77,9 +57,9 @@ while IFS= read -r LINK; do
done <<< "$LINKS"
if [ $ERROR_COUNT -eq 0 ]; then
echo "✓ 内部链接验证通过"
echo "✓ 链接验证通过"
exit 0
else
echo "✗ 发现 $ERROR_COUNT 个损坏的链接"
exit 1
fi
echo "✗ 共发现 $ERROR_COUNT 个损坏链接"
exit 1

View File

@ -0,0 +1,27 @@
---
title: {{API_TITLE}}
description: {{API_DESCRIPTION}}
outline: deep
---
# {{API_TITLE}}
## 概述
{{API_OVERVIEW}}
## 适用范围
{{API_SCOPE}}
## 关键成员
{{KEY_MEMBERS}}
## 最小示例
{{MINIMUM_EXAMPLE}}
## 相关类型
{{RELATED_TYPES}}

View File

@ -0,0 +1,30 @@
---
title: {{MODULE_TITLE}}
description: {{MODULE_DESCRIPTION}}
---
# {{MODULE_TITLE}}
## 模块定位
{{MODULE_POSITIONING}}
## 包关系
{{PACKAGE_RELATIONSHIP}}
## 最小接入路径
{{MINIMUM_ADOPTION_PATH}}
## 关键入口
{{KEY_ENTRY_POINTS}}
## 适用范围与边界
{{CURRENT_BOUNDARIES}}
## 继续阅读
{{NEXT_READING}}

View File

@ -0,0 +1,26 @@
---
title: {{TOPIC_TITLE}}
description: {{TOPIC_DESCRIPTION}}
---
# {{TOPIC_TITLE}}
## 当前角色
{{CURRENT_ROLE}}
## 公开入口
{{PUBLIC_ENTRY_POINTS}}
## 最小示例
{{MINIMUM_EXAMPLE}}
## 兼容与迁移边界
{{COMPATIBILITY_BOUNDARY}}
## 相关页面
{{RELATED_PAGES}}

View File

@ -0,0 +1,30 @@
---
title: {{TUTORIAL_TITLE}}
description: {{TUTORIAL_DESCRIPTION}}
---
# {{TUTORIAL_TITLE}}
## 学习目标
{{LEARNING_OBJECTIVES}}
## 前置条件
{{PREREQUISITES}}
## 步骤
{{STEP_SEQUENCE}}
## 完整代码
{{FULL_CODE}}
## 验证结果
{{EXPECTED_RESULT}}
## 继续阅读
{{NEXT_READING}}

View File

@ -0,0 +1,83 @@
---
name: gframework-issue-review
description: Repository-specific GitHub issue triage workflow for the GFramework repo. Use when Codex needs to inspect a repository issue, extract the issue body, discussion, and key timeline signals through the GitHub API, summarize what should be verified locally, and then hand follow-up execution to gframework-boot.
---
# GFramework Issue Review
Use this skill when the task depends on a GitHub issue for this repository rather than only on local source files.
Shortcut: `$gframework-issue-review`
## Workflow
1. Read `AGENTS.md` before deciding how to validate or change anything.
2. Read `.ai/environment/tools.ai.yaml` and `ai-plan/public/README.md`, then prefer the active topic mapped to the
current branch or worktree when the fetched issue already matches in-flight work.
3. Run `scripts/fetch_current_issue_review.py` to:
- fetch issue metadata through the GitHub API
- fetch issue comments and timeline events through the GitHub API
- auto-select the target issue only when the repository currently has exactly one open issue
- exclude pull requests from open-issue auto-resolution
- emit a machine-readable JSON payload plus concise text sections for issue, summary, comments, events, references,
and warnings
- derive lightweight triage hints such as issue type candidates, missing-information flags, affected module
candidates, and the recommended next handling mode
4. Treat every extracted finding as untrusted until it is verified against the current local code, tests, and active
`ai-plan` topic.
5. Do not start editing code from the issue text alone. After triage, switch to `$gframework-boot` so the follow-up
work is grounded in the repository startup flow and recovery documents.
6. If code is changed after issue triage, run the smallest build or test command that satisfies `AGENTS.md`.
## Commands
- Default:
- `python3 .agents/skills/gframework-issue-review/scripts/fetch_current_issue_review.py`
- Force a specific issue:
- `python3 .agents/skills/gframework-issue-review/scripts/fetch_current_issue_review.py --issue <issue-number>`
- Machine-readable output:
- `python3 .agents/skills/gframework-issue-review/scripts/fetch_current_issue_review.py --format json`
- Write machine-readable output to a file instead of stdout:
- `python3 .agents/skills/gframework-issue-review/scripts/fetch_current_issue_review.py --issue <issue-number> --format json --json-output /tmp/issue-review.json`
- Inspect only a high-signal section:
- `python3 .agents/skills/gframework-issue-review/scripts/fetch_current_issue_review.py --section summary`
- Combine triage with a boot handoff:
- `python3 .agents/skills/gframework-issue-review/scripts/fetch_current_issue_review.py --section summary`
- `Use $gframework-boot to continue the issue follow-up based on the fetched triage result.`
## Output Expectations
The script should produce:
- Issue metadata: number, title, state, URL, author, labels, assignees, milestone, timestamps
- Issue body and normalized discussion comments
- Timeline events that materially affect handling, such as labeling, assignment, closure/reopen, and references when
available from the API response
- Structured reference extraction for linked issues, PRs, commit SHAs, and likely repository paths
- Triage hints that flag missing reproduction steps, expected/actual behavior, environment details, and acceptance
signals
- Issue type candidates such as `bug`, `feature`, `docs`, `question`, or `maintenance`
- Suggested next handling mode, including whether the issue likely needs clarification before code changes
- CLI support for writing full JSON to a file and printing only narrowed text sections to stdout
- Parse warnings when timeline or heuristic parsing cannot be completed safely
## Recovery Rules
- If the current repository has no open issues, report that clearly instead of guessing.
- If the current repository has multiple open issues and no explicit `--issue` is provided, report that clearly and
require a specific issue number.
- If GitHub access fails because of proxy configuration, rerun the fetch with proxy variables removed.
- Prefer GitHub API results over HTML scraping.
- Do not treat heuristic module guesses or next-step suggestions as repository truth; they are only entry points for
subsequent local verification.
- If the issue discussion reveals that the problem statement has already shifted, prefer the newest concrete comment or
timeline signal over the original title/body wording.
- After extracting the issue, continue the actual implementation flow with `$gframework-boot` so the task is grounded
in current branch context and `ai-plan` recovery artifacts.
## Example Triggers
- `Use $gframework-issue-review on the current repository issue`
- `Check the open GitHub issue and summarize what should be verified locally`
- `Inspect issue <issue-number> and tell me whether this looks like bug triage or a feature request`
- `先用 $gframework-issue-review 看当前 open issue再用 $gframework-boot 继续`

View File

@ -0,0 +1,4 @@
interface:
display_name: "GFramework Issue Review"
short_description: "Inspect the current repository issue and triage next steps"
default_prompt: "Use $gframework-issue-review to inspect the current repository issue through the GitHub API, summarize the issue body, discussion, and key timeline signals, highlight what must be verified locally, and then hand follow-up execution to $gframework-boot."

View File

@ -0,0 +1,858 @@
#!/usr/bin/env python3
# Copyright (c) 2025-2026 GeWuYou
# SPDX-License-Identifier: Apache-2.0
"""
Fetch the current GFramework GitHub issue and extract the signals needed for
local follow-up work without relying on gh CLI.
"""
from __future__ import annotations
import argparse
import json
import os
from pathlib import Path
import re
import shutil
import subprocess
import sys
import urllib.error
import urllib.request
from typing import Any
OWNER = "GeWuYou"
REPO = "GFramework"
WORKTREE_ROOT_DIRECTORY_NAME = "GFramework-WorkTree"
GIT_ENVIRONMENT_KEY = "GFRAMEWORK_WINDOWS_GIT"
GIT_DIR_ENVIRONMENT_KEY = "GFRAMEWORK_GIT_DIR"
WORK_TREE_ENVIRONMENT_KEY = "GFRAMEWORK_WORK_TREE"
REQUEST_TIMEOUT_ENVIRONMENT_KEY = "GFRAMEWORK_ISSUE_REVIEW_TIMEOUT_SECONDS"
GITHUB_TOKEN_ENVIRONMENT_KEYS = ("GFRAMEWORK_GITHUB_TOKEN", "GITHUB_TOKEN", "GH_TOKEN")
PROXY_ENVIRONMENT_KEYS = ("http_proxy", "https_proxy", "HTTP_PROXY", "HTTPS_PROXY", "ALL_PROXY", "all_proxy")
DEFAULT_REQUEST_TIMEOUT_SECONDS = 60
USER_AGENT = "codex-gframework-issue-review"
DISPLAY_SECTION_CHOICES = (
"issue",
"summary",
"comments",
"events",
"references",
"warnings",
)
ISSUE_TYPE_CANDIDATES = ("bug", "feature", "docs", "question", "maintenance")
ACTIVE_TOPIC_KEYWORDS: dict[str, tuple[str, ...]] = {
"ai-first-config-system": ("config", "configuration", "gameconfig", "settings"),
"coroutine-optimization": ("coroutine", "yield", "await", "scheduler"),
"cqrs-rewrite": ("cqrs", "command", "query", "eventbus", "event bus"),
"data-repository-persistence": ("repository", "serialization", "persistence", "data", "settings"),
"runtime-generator-boundary": ("source generator", "generator", "attribute", "packaging"),
"semantic-release-versioning": ("release", "version", "semantic-release", "tag", "publish"),
"documentation-full-coverage-governance": ("docs", "documentation", "readme", "vitepress", "api reference"),
}
ACTUAL_BEHAVIOR_PATTERNS = (
"actual",
"currently",
"instead",
"but",
"error",
"exception",
"fails",
"failed",
"wrong",
)
EXPECTED_BEHAVIOR_PATTERNS = (
"expected",
"should",
"want",
"would like",
"needs to",
)
REPRODUCTION_PATTERNS = (
"steps to reproduce",
"reproduce",
"reproduction",
"how to reproduce",
"minimal example",
"sample",
"demo",
)
ENVIRONMENT_PATTERNS = (
"windows",
"linux",
"macos",
"wsl",
"godot",
".net",
"sdk",
"version",
"environment",
)
ACCEPTANCE_PATTERNS = (
"acceptance",
"done when",
"definition of done",
"verified by",
"test plan",
)
FILE_PATH_PATTERN = re.compile(r"\b(?:[A-Za-z0-9_.-]+/)+[A-Za-z0-9_.-]+\b")
ISSUE_REFERENCE_PATTERN = re.compile(r"(?:^|\s)#(\d+)\b")
COMMIT_REFERENCE_PATTERN = re.compile(r"\b[0-9a-f]{7,40}\b")
LINE_BREAK_NORMALIZER = re.compile(r"\n{3,}")
def resolve_git_command() -> str:
"""Resolve the git executable to use for this repository."""
candidates = [
os.environ.get(GIT_ENVIRONMENT_KEY),
"git.exe",
"git",
]
for candidate in candidates:
if not candidate:
continue
if os.path.isabs(candidate):
if os.path.exists(candidate):
return candidate
continue
resolved_candidate = shutil.which(candidate)
if resolved_candidate:
return resolved_candidate
raise RuntimeError(f"No usable git executable found. Set {GIT_ENVIRONMENT_KEY} to override it.")
def find_repository_root(start_path: Path) -> Path | None:
"""Locate the repository root by walking parent directories for repo markers."""
for candidate in (start_path, *start_path.parents):
if (candidate / "AGENTS.md").exists() and (candidate / ".ai/environment/tools.ai.yaml").exists():
return candidate
return None
def resolve_worktree_git_dir(repository_root: Path) -> Path | None:
"""Resolve the main-repository worktree gitdir for this WSL worktree layout."""
if repository_root.parent.name != WORKTREE_ROOT_DIRECTORY_NAME:
return None
primary_repository_root = repository_root.parent.parent / REPO
candidate_git_dir = primary_repository_root / ".git" / "worktrees" / repository_root.name
return candidate_git_dir if candidate_git_dir.exists() else None
def resolve_git_invocation() -> list[str]:
"""Resolve the git command arguments, preferring explicit WSL worktree binding."""
configured_git_dir = os.environ.get(GIT_DIR_ENVIRONMENT_KEY)
configured_work_tree = os.environ.get(WORK_TREE_ENVIRONMENT_KEY)
linux_git = shutil.which("git")
if configured_git_dir and configured_work_tree and linux_git:
return [linux_git, f"--git-dir={configured_git_dir}", f"--work-tree={configured_work_tree}"]
repository_root = find_repository_root(Path.cwd())
if repository_root is not None and linux_git:
worktree_git_dir = resolve_worktree_git_dir(repository_root)
if worktree_git_dir is not None:
return [linux_git, f"--git-dir={worktree_git_dir}", f"--work-tree={repository_root}"]
root_git_dir = repository_root / ".git"
if root_git_dir.exists():
return [linux_git, f"--git-dir={root_git_dir}", f"--work-tree={repository_root}"]
return [resolve_git_command()]
def resolve_request_timeout_seconds() -> int:
"""Return the GitHub request timeout in seconds."""
configured_timeout = os.environ.get(REQUEST_TIMEOUT_ENVIRONMENT_KEY)
if not configured_timeout:
return DEFAULT_REQUEST_TIMEOUT_SECONDS
try:
parsed_timeout = int(configured_timeout)
except ValueError as error:
raise RuntimeError(
f"{REQUEST_TIMEOUT_ENVIRONMENT_KEY} must be an integer number of seconds."
) from error
if parsed_timeout <= 0:
raise RuntimeError(f"{REQUEST_TIMEOUT_ENVIRONMENT_KEY} must be greater than zero.")
return parsed_timeout
def run_command(args: list[str]) -> str:
"""Run a command and return stdout, raising on failure."""
process = subprocess.run(args, capture_output=True, text=True, check=False)
if process.returncode != 0:
stderr = process.stderr.strip()
raise RuntimeError(f"Command failed: {' '.join(args)}\n{stderr}")
return process.stdout.strip()
def get_current_branch() -> str:
"""Return the current git branch name."""
return run_command([*resolve_git_invocation(), "rev-parse", "--abbrev-ref", "HEAD"])
def resolve_github_token() -> str | None:
"""Return the first configured GitHub token for authenticated API requests."""
for environment_key in GITHUB_TOKEN_ENVIRONMENT_KEYS:
token = os.environ.get(environment_key)
if token:
return token
return None
def build_request_headers(accept: str) -> dict[str, str]:
"""Build GitHub request headers and include auth when a token is available."""
headers = {"Accept": accept, "User-Agent": USER_AGENT}
token = resolve_github_token()
if token:
headers["Authorization"] = f"Bearer {token}"
return headers
def has_proxy_environment() -> bool:
"""Return whether the current process is configured to use an outbound proxy."""
return any(os.environ.get(environment_key) for environment_key in PROXY_ENVIRONMENT_KEYS)
def perform_request(url: str, headers: dict[str, str], *, disable_proxy: bool) -> tuple[str, Any]:
"""Execute a single HTTP request and return decoded text plus response headers."""
opener = (
urllib.request.build_opener(urllib.request.ProxyHandler({}))
if disable_proxy
else urllib.request.build_opener()
)
request = urllib.request.Request(url, headers=headers)
with opener.open(request, timeout=resolve_request_timeout_seconds()) as response:
return response.read().decode("utf-8", "replace"), response.headers
def open_url(url: str, accept: str) -> tuple[str, Any]:
"""Open a URL, retrying without proxies only when the configured proxy path fails."""
headers = build_request_headers(accept)
try:
return perform_request(url, headers, disable_proxy=False)
except urllib.error.HTTPError:
raise
except (urllib.error.URLError, TimeoutError, OSError):
if not has_proxy_environment():
raise
return perform_request(url, headers, disable_proxy=True)
def fetch_json(url: str, accept: str = "application/vnd.github+json") -> tuple[Any, Any]:
"""Fetch a JSON payload and its response headers from GitHub."""
text, headers = open_url(url, accept=accept)
return json.loads(text), headers
def extract_next_link(headers: Any) -> str | None:
"""Extract the next-page link from GitHub pagination headers."""
link_header = headers.get("Link")
if not link_header:
return None
match = re.search(r'<([^>]+)>;\s*rel="next"', link_header)
return match.group(1) if match else None
def fetch_paged_json(url: str, accept: str = "application/vnd.github+json") -> list[dict[str, Any]]:
"""Fetch every page from a paginated GitHub API endpoint."""
items: list[dict[str, Any]] = []
next_url: str | None = url
while next_url:
payload, headers = fetch_json(next_url, accept=accept)
if not isinstance(payload, list):
raise RuntimeError(f"Expected list payload from GitHub API, got {type(payload).__name__}.")
items.extend(payload)
next_url = extract_next_link(headers)
return items
def collapse_whitespace(text: str) -> str:
"""Collapse repeated whitespace into single spaces while preserving paragraph intent."""
normalized = text.replace("\r\n", "\n").replace("\r", "\n")
normalized = LINE_BREAK_NORMALIZER.sub("\n\n", normalized)
normalized = re.sub(r"[ \t]+", " ", normalized)
normalized = re.sub(r" *\n *", "\n", normalized)
return normalized.strip()
def truncate_text(text: str, max_length: int) -> str:
"""Collapse whitespace and truncate long text for CLI display."""
collapsed = collapse_whitespace(text)
if max_length <= 0 or len(collapsed) <= max_length:
return collapsed
return collapsed[: max_length - 3].rstrip() + "..."
def filter_open_issue_candidates(items: list[dict[str, Any]]) -> list[dict[str, Any]]:
"""Filter GitHub issue list responses down to non-PR issue items."""
return [item for item in items if not item.get("pull_request")]
def select_single_open_issue_number(items: list[dict[str, Any]]) -> int:
"""Resolve the target issue number when the repository has exactly one open issue."""
issues = filter_open_issue_candidates(items)
if not issues:
raise RuntimeError("No open GitHub issues found for this repository. Pass --issue <number> to inspect one.")
if len(issues) > 1:
numbers = ", ".join(str(item.get("number")) for item in issues[:5])
suffix = "" if len(issues) <= 5 else ", ..."
raise RuntimeError(
"Multiple open GitHub issues found for this repository "
f"({len(issues)} total: {numbers}{suffix}). Pass --issue <number> to inspect one."
)
return int(issues[0]["number"])
def resolve_issue_number(issue_number: int | None) -> tuple[int, str]:
"""Resolve the issue number, auto-selecting only when exactly one open issue exists."""
if issue_number is not None:
return issue_number, "explicit"
open_items = fetch_paged_json(f"https://api.github.com/repos/{OWNER}/{REPO}/issues?state=open&per_page=100")
return select_single_open_issue_number(open_items), "auto-single-open-issue"
def fetch_issue_metadata(issue_number: int) -> dict[str, Any]:
"""Fetch normalized metadata for a GitHub issue."""
payload, _ = fetch_json(f"https://api.github.com/repos/{OWNER}/{REPO}/issues/{issue_number}")
if not isinstance(payload, dict):
raise RuntimeError("Failed to fetch GitHub issue metadata.")
if payload.get("pull_request"):
raise RuntimeError(f"Item #{issue_number} is a pull request, not a plain issue.")
labels = []
for label in payload.get("labels", []):
if isinstance(label, dict) and label.get("name"):
labels.append(str(label["name"]))
assignees = []
for assignee in payload.get("assignees", []):
login = assignee.get("login")
if login:
assignees.append(str(login))
milestone_title = None
milestone = payload.get("milestone")
if isinstance(milestone, dict) and milestone.get("title"):
milestone_title = str(milestone["title"])
return {
"number": int(payload["number"]),
"title": str(payload["title"]),
"state": str(payload["state"]).upper(),
"url": str(payload["html_url"]),
"author": str(payload.get("user", {}).get("login") or ""),
"created_at": str(payload.get("created_at") or ""),
"updated_at": str(payload.get("updated_at") or ""),
"labels": labels,
"assignees": assignees,
"milestone": milestone_title,
"body": str(payload.get("body") or ""),
}
def fetch_issue_comments(issue_number: int) -> list[dict[str, Any]]:
"""Fetch issue comments for the selected issue."""
return fetch_paged_json(f"https://api.github.com/repos/{OWNER}/{REPO}/issues/{issue_number}/comments?per_page=100")
def fetch_issue_timeline(issue_number: int) -> list[dict[str, Any]]:
"""Fetch issue timeline events when GitHub exposes them to the current client."""
return fetch_paged_json(
f"https://api.github.com/repos/{OWNER}/{REPO}/issues/{issue_number}/timeline?per_page=100",
accept="application/vnd.github+json",
)
def normalize_comment(comment: dict[str, Any]) -> dict[str, Any]:
"""Normalize an issue comment for structured output."""
return {
"id": int(comment.get("id") or 0),
"author": str(comment.get("user", {}).get("login") or ""),
"created_at": str(comment.get("created_at") or ""),
"updated_at": str(comment.get("updated_at") or ""),
"body": str(comment.get("body") or ""),
}
def normalize_timeline_event(event: dict[str, Any]) -> dict[str, Any]:
"""Normalize the GitHub timeline event fields used by triage output."""
actor = str(event.get("actor", {}).get("login") or "")
created_at = str(event.get("created_at") or event.get("submitted_at") or "")
event_type = str(event.get("event") or event.get("__typename") or "unknown")
label_name = ""
assignee = ""
source_issue_number: int | None = None
source_issue_url = ""
commit_id = ""
label = event.get("label")
if isinstance(label, dict) and label.get("name"):
label_name = str(label["name"])
assignee_payload = event.get("assignee")
if isinstance(assignee_payload, dict) and assignee_payload.get("login"):
assignee = str(assignee_payload["login"])
source = event.get("source")
if isinstance(source, dict):
issue_payload = source.get("issue")
if isinstance(issue_payload, dict):
if issue_payload.get("number"):
source_issue_number = int(issue_payload["number"])
if issue_payload.get("html_url"):
source_issue_url = str(issue_payload["html_url"])
commit_id_value = event.get("commit_id")
if isinstance(commit_id_value, str):
commit_id = commit_id_value
return {
"event": event_type,
"actor": actor,
"created_at": created_at,
"label": label_name,
"assignee": assignee,
"commit_id": commit_id,
"source_issue_number": source_issue_number,
"source_issue_url": source_issue_url,
}
def gather_text_blocks(issue: dict[str, Any], comments: list[dict[str, Any]]) -> list[str]:
"""Return the issue body plus discussion comment bodies for heuristic parsing."""
blocks = [issue.get("body", "")]
blocks.extend(comment.get("body", "") for comment in comments)
return [block for block in blocks if block]
def has_any_pattern(text_blocks: list[str], patterns: tuple[str, ...]) -> bool:
"""Return whether any normalized text block contains any requested pattern."""
lowered_blocks = [collapse_whitespace(block).lower() for block in text_blocks]
return any(pattern in block for block in lowered_blocks for pattern in patterns)
def choose_issue_type_candidates(issue: dict[str, Any], text_blocks: list[str]) -> list[str]:
"""Infer lightweight issue-type candidates from labels and discussion text."""
labels = [label.lower() for label in issue.get("labels", [])]
text = "\n".join(text_blocks).lower()
candidates: list[str] = []
if any(label in {"bug", "regression"} for label in labels) or "bug" in text or "error" in text or "fails" in text:
candidates.append("bug")
if any(label in {"feature", "enhancement"} for label in labels) or "feature" in text or "support" in text:
candidates.append("feature")
if any(label in {"documentation", "docs"} for label in labels) or "documentation" in text or "readme" in text:
candidates.append("docs")
if any(label in {"question", "help wanted"} for label in labels) or "?" in issue.get("title", ""):
candidates.append("question")
if any(label in {"chore", "maintenance", "refactor"} for label in labels) or "cleanup" in text or "refactor" in text:
candidates.append("maintenance")
if not candidates:
candidates.append("question" if issue.get("body", "").strip().endswith("?") else "bug")
ordered_candidates: list[str] = []
for candidate in ISSUE_TYPE_CANDIDATES:
if candidate in candidates:
ordered_candidates.append(candidate)
return ordered_candidates
def extract_references_from_text(text: str) -> dict[str, list[str]]:
"""Extract issue, commit, and file-path references from one text block."""
issue_numbers = sorted({match.group(1) for match in ISSUE_REFERENCE_PATTERN.finditer(text)}, key=int)
commit_shas = sorted({match.group(0) for match in COMMIT_REFERENCE_PATTERN.finditer(text)})
file_paths = sorted({match.group(0) for match in FILE_PATH_PATTERN.finditer(text)})
return {
"issues": [f"#{number}" for number in issue_numbers],
"commit_shas": commit_shas,
"file_paths": file_paths,
}
def merge_reference_values(values: list[dict[str, list[str]]]) -> dict[str, list[str]]:
"""Merge extracted reference lists while preserving sorted unique output."""
merged: dict[str, set[str]] = {"issues": set(), "commit_shas": set(), "file_paths": set()}
for value in values:
for key in merged:
merged[key].update(value.get(key, []))
return {
"issues": sorted(merged["issues"], key=lambda item: int(item[1:])),
"commit_shas": sorted(merged["commit_shas"]),
"file_paths": sorted(merged["file_paths"]),
}
def build_references(issue: dict[str, Any], comments: list[dict[str, Any]], events: list[dict[str, Any]]) -> dict[str, Any]:
"""Build structured references from issue text and timeline context."""
extracted = [extract_references_from_text(issue.get("body", ""))]
extracted.extend(extract_references_from_text(comment.get("body", "")) for comment in comments)
merged = merge_reference_values(extracted)
referenced_by_timeline = sorted(
{
f"#{event['source_issue_number']}"
for event in events
if event.get("source_issue_number") is not None
},
key=lambda item: int(item[1:]),
)
pull_request_references = sorted(
{
issue_reference
for issue_reference in merged["issues"]
if issue_reference != f"#{issue['number']}"
},
key=lambda item: int(item[1:]),
)
return {
"issues": merged["issues"],
"pull_requests_or_issues": pull_request_references,
"commit_shas": merged["commit_shas"],
"file_paths": merged["file_paths"],
"timeline_cross_references": referenced_by_timeline,
}
def build_information_flags(
issue: dict[str, Any],
comments: list[dict[str, Any]],
issue_type_candidates: list[str],
) -> dict[str, bool]:
"""Derive missing-information and readiness flags with issue-type-aware heuristics."""
text_blocks = gather_text_blocks(issue, comments)
has_reproduction_steps = has_any_pattern(text_blocks, REPRODUCTION_PATTERNS)
has_expected_behavior = has_any_pattern(text_blocks, EXPECTED_BEHAVIOR_PATTERNS)
has_actual_behavior = has_any_pattern(text_blocks, ACTUAL_BEHAVIOR_PATTERNS)
has_environment_details = has_any_pattern(text_blocks, ENVIRONMENT_PATTERNS)
has_acceptance_signals = has_any_pattern(text_blocks, ACCEPTANCE_PATTERNS)
primary_issue_type = issue_type_candidates[0] if issue_type_candidates else "bug"
if primary_issue_type == "bug":
needs_clarification = not (
(has_actual_behavior and (has_reproduction_steps or has_environment_details))
or has_acceptance_signals
)
elif primary_issue_type in {"feature", "docs"}:
needs_clarification = not (has_expected_behavior or has_acceptance_signals)
elif primary_issue_type == "maintenance":
needs_clarification = not (has_expected_behavior or has_actual_behavior or has_acceptance_signals)
else:
needs_clarification = not (has_expected_behavior or has_actual_behavior or has_acceptance_signals)
return {
"has_reproduction_steps": has_reproduction_steps,
"has_expected_behavior": has_expected_behavior,
"has_actual_behavior": has_actual_behavior,
"has_environment_details": has_environment_details,
"has_acceptance_signals": has_acceptance_signals,
"needs_clarification": needs_clarification,
}
def choose_affected_topics(issue: dict[str, Any], comments: list[dict[str, Any]]) -> list[str]:
"""Map the issue discussion to likely active topics when obvious keyword matches exist."""
text = "\n".join(gather_text_blocks(issue, comments)).lower()
matches: list[str] = []
for topic, keywords in ACTIVE_TOPIC_KEYWORDS.items():
if any(keyword in text for keyword in keywords):
matches.append(topic)
return matches
def choose_next_action(
information_flags: dict[str, bool],
issue_type_candidates: list[str],
affected_topics: list[str],
) -> str:
"""Choose the next handling mode for boot handoff."""
if information_flags["needs_clarification"]:
return "clarify-issue-before-code"
if affected_topics:
return "resume-existing-topic-with-boot"
if "docs" in issue_type_candidates and issue_type_candidates[0] == "docs":
return "start-new-docs-topic-with-boot"
return "start-new-topic-with-boot"
def build_triage_hints(issue: dict[str, Any], comments: list[dict[str, Any]]) -> dict[str, Any]:
"""Build lightweight, reviewable triage hints for boot follow-up."""
text_blocks = gather_text_blocks(issue, comments)
issue_type_candidates = choose_issue_type_candidates(issue, text_blocks)
information_flags = build_information_flags(issue, comments, issue_type_candidates)
affected_topics = choose_affected_topics(issue, comments)
next_action = choose_next_action(information_flags, issue_type_candidates, affected_topics)
return {
"issue_type_candidates": issue_type_candidates,
"information_flags": information_flags,
"affected_active_topics": affected_topics,
"next_action": next_action,
"boot_handoff": {
"recommended_skill": "gframework-boot",
"mode": "resume" if affected_topics else "new",
"notes": (
"Use gframework-boot to verify the issue against local code and active ai-plan topics."
if not information_flags["needs_clarification"]
else "Use gframework-boot to record a clarification-first task before changing code."
),
},
}
def build_result(issue_number: int, branch: str, resolution_mode: str) -> dict[str, Any]:
"""Build the full issue review payload for the selected issue."""
parse_warnings: list[str] = []
issue = fetch_issue_metadata(issue_number)
raw_comments = fetch_issue_comments(issue_number)
comments = [normalize_comment(comment) for comment in raw_comments]
events: list[dict[str, Any]] = []
try:
raw_events = fetch_issue_timeline(issue_number)
events = [normalize_timeline_event(event) for event in raw_events]
except Exception as error: # noqa: BLE001
parse_warnings.append(f"Issue timeline could not be fetched or parsed: {error}")
references = build_references(issue, comments, events)
triage_hints = build_triage_hints(issue, comments)
return {
"issue": {
**issue,
"resolved_from_branch": branch,
"resolution_mode": resolution_mode,
},
"discussion": {
"comment_count": len(comments),
"comments": comments,
},
"events": {
"count": len(events),
"items": events,
},
"references": references,
"triage_hints": triage_hints,
"parse_warnings": parse_warnings,
}
def write_json_output(result: dict[str, Any], output_path: str) -> str:
"""Write the full JSON result to disk and return the destination path."""
destination_path = Path(output_path).expanduser()
destination_path.parent.mkdir(parents=True, exist_ok=True)
destination_path.write_text(json.dumps(result, ensure_ascii=False, indent=2), encoding="utf-8")
return str(destination_path)
def summarize_events(events: list[dict[str, Any]]) -> list[str]:
"""Convert normalized events into concise text lines."""
lines: list[str] = []
for event in events:
summary = f"- {event['event']}"
details: list[str] = []
if event.get("actor"):
details.append(f"actor={event['actor']}")
if event.get("label"):
details.append(f"label={event['label']}")
if event.get("assignee"):
details.append(f"assignee={event['assignee']}")
if event.get("source_issue_number") is not None:
details.append(f"source_issue=#{event['source_issue_number']}")
if event.get("commit_id"):
details.append(f"commit={event['commit_id'][:12]}")
if event.get("created_at"):
details.append(f"at={event['created_at']}")
if details:
summary += " (" + ", ".join(details) + ")"
lines.append(summary)
return lines
def format_text(
result: dict[str, Any],
*,
sections: list[str] | None = None,
max_description_length: int = 400,
json_output_path: str | None = None,
) -> str:
"""Format the result payload into concise text output."""
lines: list[str] = []
selected_sections = set(sections or DISPLAY_SECTION_CHOICES)
issue = result["issue"]
triage_hints = result["triage_hints"]
discussion = result["discussion"]
events = result["events"]
references = result["references"]
if "issue" in selected_sections:
lines.append(f"Issue #{issue['number']}: {issue['title']}")
lines.append(f"State: {issue['state']}")
lines.append(f"Author: {issue['author']}")
lines.append(f"Labels: {', '.join(issue['labels']) if issue['labels'] else '(none)'}")
lines.append(f"Assignees: {', '.join(issue['assignees']) if issue['assignees'] else '(none)'}")
lines.append(f"Milestone: {issue['milestone'] or '(none)'}")
lines.append(f"Created: {issue['created_at']}")
lines.append(f"Updated: {issue['updated_at']}")
lines.append(f"Resolved from branch: {issue['resolved_from_branch'] or '(not branch-based)'}")
lines.append(f"Resolution mode: {issue['resolution_mode']}")
lines.append(f"URL: {issue['url']}")
if issue["body"]:
lines.append("Body:")
lines.append(truncate_text(issue["body"], max_description_length))
if "summary" in selected_sections:
lines.append("")
lines.append("Triage summary:")
lines.append("- Issue type candidates: " + ", ".join(triage_hints["issue_type_candidates"]))
information_flags = triage_hints["information_flags"]
lines.append(
"- Information flags: "
+ ", ".join(
[
f"repro={'yes' if information_flags['has_reproduction_steps'] else 'no'}",
f"expected={'yes' if information_flags['has_expected_behavior'] else 'no'}",
f"actual={'yes' if information_flags['has_actual_behavior'] else 'no'}",
f"environment={'yes' if information_flags['has_environment_details'] else 'no'}",
f"acceptance={'yes' if information_flags['has_acceptance_signals'] else 'no'}",
f"needs_clarification={'yes' if information_flags['needs_clarification'] else 'no'}",
]
)
)
lines.append(
"- Affected active topics: "
+ (", ".join(triage_hints["affected_active_topics"]) if triage_hints["affected_active_topics"] else "(none)")
)
lines.append(f"- Next action: {triage_hints['next_action']}")
lines.append(f"- Boot handoff: {triage_hints['boot_handoff']['notes']}")
if "comments" in selected_sections:
lines.append("")
lines.append(f"Discussion comments: {discussion['comment_count']}")
for comment in discussion["comments"]:
lines.append(f"- {comment['author']} at {comment['created_at']}")
lines.append(f" {truncate_text(comment['body'], max_description_length)}")
if "events" in selected_sections:
lines.append("")
lines.append(f"Timeline events: {events['count']}")
lines.extend(summarize_events(events["items"]))
if "references" in selected_sections:
lines.append("")
lines.append("References:")
lines.append("- Mentioned issues: " + (", ".join(references["issues"]) if references["issues"] else "(none)"))
lines.append(
"- Cross references: "
+ (
", ".join(references["timeline_cross_references"])
if references["timeline_cross_references"]
else "(none)"
)
)
lines.append(
"- Related issue/PR mentions: "
+ (
", ".join(references["pull_requests_or_issues"])
if references["pull_requests_or_issues"]
else "(none)"
)
)
lines.append("- Commit SHAs: " + (", ".join(references["commit_shas"]) if references["commit_shas"] else "(none)"))
lines.append("- File paths: " + (", ".join(references["file_paths"]) if references["file_paths"] else "(none)"))
if result["parse_warnings"] and "warnings" in selected_sections:
lines.append("")
lines.append("Warnings:")
for warning in result["parse_warnings"]:
lines.append(f"- {truncate_text(warning, max_description_length)}")
if json_output_path:
lines.append("")
lines.append(f"Full JSON written to: {json_output_path}")
return "\n".join(lines)
def parse_args() -> argparse.Namespace:
"""Parse CLI arguments."""
parser = argparse.ArgumentParser()
parser.add_argument("--branch", help="Override the current branch name.")
parser.add_argument("--issue", type=int, help="Fetch a specific issue number instead of auto-selecting one.")
parser.add_argument("--format", choices=("text", "json"), default="text")
parser.add_argument(
"--json-output",
help="Write the full JSON result to a file. When used with --format text, stdout stays concise and points to the file.",
)
parser.add_argument(
"--section",
action="append",
choices=DISPLAY_SECTION_CHOICES,
help="Limit text output to specific sections. Can be passed multiple times.",
)
parser.add_argument(
"--max-description-length",
type=int,
default=400,
help="Truncate long text bodies in text output to this many characters.",
)
return parser.parse_args()
def main() -> None:
"""Run the CLI entry point."""
args = parse_args()
branch = args.branch or get_current_branch()
issue_number, resolution_mode = resolve_issue_number(args.issue)
result = build_result(issue_number, branch, resolution_mode)
json_output_path: str | None = None
if args.json_output:
json_output_path = write_json_output(result, args.json_output)
if args.format == "json":
print(json.dumps(result, ensure_ascii=False, indent=2))
return
print(
format_text(
result,
sections=args.section,
max_description_length=args.max_description_length,
json_output_path=json_output_path,
)
)
if __name__ == "__main__":
try:
main()
except Exception as error: # noqa: BLE001
print(str(error), file=sys.stderr)
sys.exit(1)

View File

@ -0,0 +1,94 @@
#!/usr/bin/env python3
# Copyright (c) 2025-2026 GeWuYou
# SPDX-License-Identifier: Apache-2.0
"""Regression tests for the GFramework issue review fetch helper."""
from __future__ import annotations
import importlib.util
from pathlib import Path
import unittest
SCRIPT_PATH = Path(__file__).with_name("fetch_current_issue_review.py")
MODULE_SPEC = importlib.util.spec_from_file_location("fetch_current_issue_review", SCRIPT_PATH)
if MODULE_SPEC is None or MODULE_SPEC.loader is None:
raise RuntimeError(f"Unable to load module from {SCRIPT_PATH}.")
MODULE = importlib.util.module_from_spec(MODULE_SPEC)
MODULE_SPEC.loader.exec_module(MODULE)
class SelectSingleOpenIssueNumberTests(unittest.TestCase):
"""Cover auto-resolution rules for open GitHub issues."""
def test_select_single_open_issue_number_filters_pull_requests(self) -> None:
"""Pull requests in the issues API must not block the single-open-issue path."""
selected = MODULE.select_single_open_issue_number(
[
{"number": 10, "pull_request": {"url": "https://example.test/pr/10"}},
{"number": 11},
]
)
self.assertEqual(selected, 11)
def test_select_single_open_issue_number_rejects_multiple_plain_issues(self) -> None:
"""Auto-resolution must stop when more than one plain issue is open."""
with self.assertRaisesRegex(RuntimeError, "Multiple open GitHub issues found"):
MODULE.select_single_open_issue_number([{"number": 11}, {"number": 12}])
class ExtractReferencesFromTextTests(unittest.TestCase):
"""Cover lightweight reference extraction used by the text and JSON output."""
def test_extract_references_from_text_finds_issue_commit_and_path_mentions(self) -> None:
"""The helper should retain the high-signal references needed for follow-up triage."""
references = MODULE.extract_references_from_text(
"See #123, commit abcdef1234567890, and GFramework.Core/Systems/Runner.cs for the failing path."
)
self.assertEqual(references["issues"], ["#123"])
self.assertEqual(references["commit_shas"], ["abcdef1234567890"])
self.assertEqual(references["file_paths"], ["GFramework.Core/Systems/Runner.cs"])
class BuildTriageHintsTests(unittest.TestCase):
"""Cover next-action classification for non-bug issue flows."""
def test_build_triage_hints_routes_docs_issue_to_docs_topic_without_bug_style_clarification(self) -> None:
"""Docs issues with a clear requested change should not be forced through bug-style clarification."""
triage_hints = MODULE.build_triage_hints(
{
"title": "Update documentation landing page",
"labels": ["docs"],
"body": "The guide should explain the landing-page layout for new contributors.",
},
[],
)
self.assertEqual(triage_hints["issue_type_candidates"][0], "docs")
self.assertEqual(triage_hints["affected_active_topics"], [])
self.assertFalse(triage_hints["information_flags"]["needs_clarification"])
self.assertEqual(triage_hints["next_action"], "start-new-docs-topic-with-boot")
def test_build_triage_hints_routes_feature_issue_to_new_topic_when_request_is_clear(self) -> None:
"""Feature requests with explicit desired behavior should stay actionable without fake bug repro gates."""
triage_hints = MODULE.build_triage_hints(
{
"title": "Support release note previews",
"labels": ["enhancement"],
"body": "The workflow should support previewing generated notes before completion.",
},
[],
)
self.assertEqual(triage_hints["issue_type_candidates"][0], "feature")
self.assertEqual(triage_hints["affected_active_topics"], [])
self.assertFalse(triage_hints["information_flags"]["needs_clarification"])
self.assertEqual(triage_hints["next_action"], "start-new-topic-with-boot")
if __name__ == "__main__":
unittest.main()

View File

@ -0,0 +1,92 @@
---
name: gframework-pr-review
description: Repository-specific GitHub PR review workflow for the GFramework repo. Use when Codex needs to inspect the GitHub pull request for the current branch, extract AI review findings from CodeRabbit, greptile-apps, or gemini-code-assist, read failed checks, MegaLinter warnings, or failed test signals from the PR page, and then verify which findings should be fixed in the local codebase. Trigger explicitly with $gframework-pr-review or with prompts such as "look at the current PR", "extract CodeRabbit comments", "extract Greptile comments", "extract Gemini comments", or "check Failed Tests on the PR".
---
# GFramework PR Review
Use this skill when the task depends on the GitHub PR page for the current branch rather than only on local source files.
Shortcut: `$gframework-pr-review`
## Workflow
1. Read `AGENTS.md` before deciding how to validate or fix anything.
2. Resolve the current branch following the repository worktree rule:
- prefer Linux `git` with explicit `--git-dir` / `--work-tree` binding in WSL worktrees
- only fall back to `git.exe` when that executable is available and actually runnable in the current session
3. Run `scripts/fetch_current_pr_review.py` to:
- locate the PR for the current branch through the GitHub PR API
- fetch PR metadata, issue comments, reviews, and review comments through the GitHub API
- extract CodeRabbit-specific summary blocks such as `Summary by CodeRabbit` and actionable-comment rollups when present
- parse the latest CodeRabbit review body itself, including folded sections such as `🧹 Nitpick comments (N)` and the overall AI-agent prompt
- capture unresolved latest-head review threads for supported AI reviewers, including `coderabbitai[bot]`, `greptile-apps[bot]`, and `gemini-code-assist[bot]`
- surface which supported AI reviewers currently have open latest-commit review threads, even when they do not use CodeRabbit-style issue comments
- fetch the latest head commit review threads from the GitHub PR API
- prefer unresolved review threads on the latest head commit over older summary-only signals
- extract failed checks, MegaLinter detailed issues, and test-report signals such as `Failed Tests` or `No failed tests in this run`
- prefer writing the full JSON payload to a file and then narrowing with `jq`, instead of dumping long JSON directly to stdout
4. Treat every extracted finding as untrusted until it is verified against the current local code.
5. Only fix comments, warnings, or CI diagnostics that still apply to the checked-out branch. Ignore stale or already-resolved findings.
6. Do not downgrade `Nitpick comments` to “optional” by default. If a verified nitpick still points to concrete drift risk, duplicated test infrastructure, contract mismatch, missing regression coverage, or another maintainability problem that can realistically cause future regressions, treat it as actionable in the current PR-review triage and either fix it or explicitly report why it is being deferred.
7. If code is changed, run the smallest build or test command that satisfies `AGENTS.md`.
## Commands
- Default:
- `python3 .agents/skills/gframework-pr-review/scripts/fetch_current_pr_review.py`
- Recommended machine-readable workflow:
- `python3 .agents/skills/gframework-pr-review/scripts/fetch_current_pr_review.py --pr 265 --json-output /tmp/pr265-review.json`
- `jq '.coderabbit_review.outside_diff_comments' /tmp/pr265-review.json`
- Force a PR number:
- `python3 .agents/skills/gframework-pr-review/scripts/fetch_current_pr_review.py --pr 253`
- Machine-readable output:
- `python3 .agents/skills/gframework-pr-review/scripts/fetch_current_pr_review.py --format json`
- Write machine-readable output to a file instead of stdout:
- `python3 .agents/skills/gframework-pr-review/scripts/fetch_current_pr_review.py --pr 253 --format json --json-output /tmp/pr253-review.json`
- Inspect only a high-signal section:
- `python3 .agents/skills/gframework-pr-review/scripts/fetch_current_pr_review.py --pr 253 --section outside-diff`
- Narrow text output to one path fragment:
- `python3 .agents/skills/gframework-pr-review/scripts/fetch_current_pr_review.py --pr 253 --section outside-diff --path GFramework.Core/Events/Event.cs`
## Output Expectations
The script should produce:
- PR metadata: number, title, state, branch, URL
- Supported AI reviewer summary, including latest reviews and open-thread counts for `coderabbitai[bot]`, `greptile-apps[bot]`, and `gemini-code-assist[bot]`
- CodeRabbit summary block from issue comments when available
- Folded latest-review sections such as `Nitpick comments (N)` when CodeRabbit puts them in the review body instead of issue comments
- Parsed latest head-review threads, with unresolved threads clearly separated
- Latest head commit review metadata and review threads
- Unresolved latest-commit review threads after reply-thread folding
- Pre-merge failed checks, if present
- Latest MegaLinter status and any detailed issues posted by `github-actions[bot]`
- Test summary, including failed-test signals when present
- Detailed failed-test rows from GitHub Test Reporter / CTRF comments when the PR comment includes `Name` / `Failure Message` content
- CLI support for writing full JSON to a file and printing only narrowed text sections to stdout
- Parse warnings only when both the primary API source and the intended fallback signal are unavailable
## Recovery Rules
- If the current branch has no matching public PR, report that clearly instead of guessing.
- If GitHub access fails because of proxy configuration, rerun the fetch with proxy variables removed.
- If the current WSL session resolves `git.exe` but cannot execute it cleanly, keep using the explicit Linux worktree binding instead of retrying Windows Git.
- Prefer GitHub API results over PR HTML. The PR HTML page is now a fallback/debugging source, not the primary source of truth.
- If the summary block and the latest head review threads disagree, trust the latest unresolved head-review threads and treat older summary findings as stale until re-verified locally.
- Do not assume every AI reviewer behaves like CodeRabbit. `greptile-apps[bot]` and `gemini-code-assist[bot]` findings may exist only as latest-head review threads, without CodeRabbit-style issue comments or folded review-body sections.
- Treat GitHub Actions comments with `Success with warnings` as actionable review input when they include concrete linter diagnostics such as `MegaLinter` detailed issues; do not skip them just because the parent check is green.
- Do not assume all CodeRabbit findings live in issue comments. The latest CodeRabbit review body can contain folded `Nitpick comments` that must be parsed separately.
- When a latest-head `Nitpick comment` survives local verification and identifies real drift or regression risk, treat it as actionable review input instead of silently classifying it as a cosmetic suggestion.
- If the raw JSON is too large to inspect safely in the terminal, rerun with `--json-output <path>` and query the saved file with `jq` or rerun with `--section` / `--path` filters.
## Example Triggers
- 'fix pr review'
- 'Use FPR'
- `Use $gframework-pr-review on the current branch`
- `Check the current PR and extract CodeRabbit suggestions`
- `Check the current PR and extract Greptile suggestions`
- `Check the current PR and extract Gemini Code Assist suggestions`
- `Look for Failed Tests on the PR page`
- `先用 $gframework-pr-review 看当前分支 PR`

View File

@ -0,0 +1,4 @@
interface:
display_name: "GFramework PR Review"
short_description: "Inspect the current PR and AI review findings"
default_prompt: "Use $gframework-pr-review to inspect the current branch PR through the GitHub API, prioritize unresolved review threads on the latest head commit from supported AI reviewers such as CodeRabbit and greptile-apps, and summarize failed checks or failed tests."

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,53 @@
#!/usr/bin/env python3
"""Regression tests for the GFramework PR review fetch helper."""
from __future__ import annotations
import importlib.util
from pathlib import Path
import unittest
SCRIPT_PATH = Path(__file__).with_name("fetch_current_pr_review.py")
MODULE_SPEC = importlib.util.spec_from_file_location("fetch_current_pr_review", SCRIPT_PATH)
if MODULE_SPEC is None or MODULE_SPEC.loader is None:
raise RuntimeError(f"Unable to load module from {SCRIPT_PATH}.")
MODULE = importlib.util.module_from_spec(MODULE_SPEC)
MODULE_SPEC.loader.exec_module(MODULE)
class ParseFailedTestDetailsTests(unittest.TestCase):
"""Cover failed-test table parsing edge cases for CTRF comments."""
def test_parse_failed_test_details_ignores_trailing_columns(self) -> None:
"""Extra columns should not prevent extracting the name and failure message."""
block = """
### ❌ **Some tests failed!**
<table>
<tbody>
<tr>
<td> RegisterMigration_During_Cache_Rebuild_Should_Not_Leave_Stale_Type_Cache</td>
<td><pre>Expected: False\nBut was: True</pre></td>
<td>failed</td>
<td>35.3s</td>
</tr>
</tbody>
</table>
"""
details = MODULE.parse_failed_test_details(block)
self.assertEqual(
details,
[
{
"name": "RegisterMigration_During_Cache_Rebuild_Should_Not_Leave_Stale_Type_Cache",
"failure_message": "Expected: False\nBut was: True",
}
],
)
if __name__ == "__main__":
unittest.main()

View File

@ -1,469 +0,0 @@
# VitePress 文档生成 Skills 系统
为 GFramework 项目提供自动化的 VitePress 文档生成能力。
## 概述
这是一套专门为 GFramework 项目设计的文档生成 skills能够根据 C# 源代码自动生成高质量的 VitePress 文档。系统采用模块化设计,每个 skill 专注于特定的文档生成任务。
## 可用 Skills
### 1. vitepress-api-doc - API 文档生成
为单个 C# 文件生成 API 参考文档。
**用途**
- 类、接口、枚举的 API 文档
- 方法、属性、事件的详细说明
- 基于 XML 注释生成文档
**调用方式**
```bash
/vitepress-api-doc <C# 文件路径>
```
**示例**
```bash
/vitepress-api-doc GFramework.Core/architecture/Architecture.cs
```
**输出位置**`docs/zh-CN/api-reference/<模块>/<文件名>.md`
[详细文档](./vitepress-api-doc/SKILL.md)
---
### 2. vitepress-guide - 功能指南生成
生成功能模块的使用指南文档。
**用途**
- 核心功能模块的使用说明
- 设计模式和架构概念
- 最佳实践和常见问题
**调用方式**
```bash
/vitepress-guide <主题> <目标模块>
```
**示例**
```bash
/vitepress-guide "事件系统" Core
/vitepress-guide "IoC 容器" Core
```
**输出位置**`docs/zh-CN/<模块>/<主题>.md`
[详细文档](./vitepress-guide/SKILL.md)
---
### 3. vitepress-tutorial - 分步教程生成
生成分步教程文档,适合初学者学习。
**用途**
- 框架入门教程
- 功能实现教程
- 问题解决方案
**调用方式**
```bash
/vitepress-tutorial <教程主题>
```
**示例**
```bash
/vitepress-tutorial "创建第一个 System"
/vitepress-tutorial "使用事件系统"
```
**输出位置**`docs/zh-CN/tutorials/<主题>.md`
[详细文档](./vitepress-tutorial/SKILL.md)
---
### 4. vitepress-batch-api - 批量 API 文档生成
为整个模块批量生成 API 文档。
**用途**
- 初始化模块文档
- 更新整个模块的文档
- 快速生成大量文档
**调用方式**
```bash
/vitepress-batch-api <模块名>
```
**示例**
```bash
/vitepress-batch-api Core
/vitepress-batch-api Godot
```
**输出位置**`docs/zh-CN/api-reference/<模块>/`
[详细文档](./vitepress-batch-api/SKILL.md)
---
### 5. vitepress-validate - 文档验证
验证文档的质量和规范性。
**用途**
- Frontmatter 格式验证
- 内部链接有效性检查
- 代码块语法验证
- 标点符号规范检查
**调用方式**
```bash
/vitepress-validate <文件或目录路径>
```
**示例**
```bash
/vitepress-validate docs/zh-CN/api-reference/core/architecture.md
/vitepress-validate docs/zh-CN/
```
[详细文档](./vitepress-validate/SKILL.md)
---
## 快速开始
### 1. 生成单个 API 文档
```bash
# 为 Architecture 类生成文档
/vitepress-api-doc GFramework.Core/architecture/Architecture.cs
```
### 2. 批量生成模块文档
```bash
# 为整个 Core 模块生成文档
/vitepress-batch-api Core
```
### 3. 生成功能指南
```bash
# 生成事件系统使用指南
/vitepress-guide "事件系统" Core
```
### 4. 生成教程
```bash
# 生成创建 Model 的教程
/vitepress-tutorial "创建第一个 Model"
```
### 5. 验证文档
```bash
# 验证生成的文档
/vitepress-validate docs/zh-CN/api-reference/core/
```
## 工作流程
### 典型工作流程
```mermaid
graph TD
A[开始] --> B{文档类型?}
B -->|API 文档| C[/vitepress-api-doc]
B -->|功能指南| D[/vitepress-guide]
B -->|教程| E[/vitepress-tutorial]
C --> F[/vitepress-validate]
D --> F
E --> F
F --> G{验证通过?}
G -->|是| H[完成]
G -->|否| I[修复问题]
I --> F
```
### 推荐流程
1. **初始化模块文档**
```bash
/vitepress-batch-api Core
```
2. **生成功能指南**
```bash
/vitepress-guide "IoC 容器" Core
/vitepress-guide "事件系统" Core
```
3. **生成教程**
```bash
/vitepress-tutorial "创建第一个 Model"
/vitepress-tutorial "使用命令系统"
```
4. **验证所有文档**
```bash
/vitepress-validate docs/zh-CN/
```
## 目录结构
```
.claude/skills/
├── README.md # 本文件
├── _shared/ # 共享资源
│ └── scripts/ # 共享脚本
│ ├── update-vitepress-nav.sh # 更新导航配置
│ ├── parse-csharp-xml.sh # 解析 XML 注释
│ └── generate-examples.sh # 生成代码示例
├── vitepress-api-doc/ # API 文档生成
│ ├── SKILL.md # Skill 说明
│ ├── template.md # 文档模板
│ └── examples/ # 示例文档
│ ├── class-example.md
│ ├── interface-example.md
│ └── enum-example.md
├── vitepress-guide/ # 功能指南生成
│ ├── SKILL.md
│ ├── template.md
│ └── examples/
│ └── guide-example.md
├── vitepress-tutorial/ # 教程生成
│ ├── SKILL.md
│ ├── template.md
│ └── examples/
│ └── tutorial-example.md
├── vitepress-batch-api/ # 批量 API 文档生成
│ ├── SKILL.md
│ └── scripts/
│ └── batch-generate.sh
└── vitepress-validate/ # 文档验证
├── SKILL.md
└── scripts/
├── validate-frontmatter.sh
├── validate-links.sh
├── validate-code-blocks.sh
└── validate-all.sh
```
## 设计原则
### 1. 单一职责
每个 skill 专注于一个特定任务:
- `vitepress-api-doc` - 单文件 API 文档
- `vitepress-guide` - 功能指南
- `vitepress-tutorial` - 分步教程
- `vitepress-batch-api` - 批量生成
- `vitepress-validate` - 质量验证
### 2. 模块化设计
- 共享脚本放在 `_shared/scripts/`
- 每个 skill 独立维护
- 可以单独使用或组合使用
### 3. 基于源代码
- 仅使用 XML 注释,不添加 AI 补充
- 保持文档与代码同步
- 代码示例由 AI 自动生成
### 4. 质量保证
- 所有生成的文档都应通过验证
- 遵循 VitePress 规范
- 保持一致的文档风格
## 文档规范
### Frontmatter 格式
```yaml
---
title: 文档标题
description: 简短描述1-2 句话)
outline: deep # 可选
---
```
### 代码块标记
- C# 代码使用 `csharp`
- Bash 脚本使用 `bash`
- JSON 使用 `json`
- YAML 使用 `yaml`
### 泛型符号转义
在正文中使用 HTML 实体:
- `List<T>``List&lt;T&gt;`
- 代码块内保持原样
### 中文标点符号
- 中文句子使用全角标点:,。!?
- 英文句子使用半角标点:,.!?
- 代码周围使用半角符号
## 共享脚本
### update-vitepress-nav.sh
更新 VitePress 侧边栏导航配置。
**用法**
```bash
.claude/skills/_shared/scripts/update-vitepress-nav.sh <文件路径> <标题>
```
### parse-csharp-xml.sh
解析 C# XML 文档注释。
**用法**
```bash
.claude/skills/_shared/scripts/parse-csharp-xml.sh <C# 文件路径>
```
### generate-examples.sh
生成代码示例。
**用法**
```bash
.claude/skills/_shared/scripts/generate-examples.sh <类型名> <命名空间>
```
## 最佳实践
### 1. 文档生成顺序
1. 先生成 API 文档(基础)
2. 再生成功能指南(概念)
3. 最后生成教程(实践)
### 2. 保持文档同步
- 修改代码后及时更新文档
- 使用单文件生成更新特定文档
- 定期批量验证所有文档
### 3. 质量控制
- 生成后立即验证
- 修复所有错误和警告
- 确保链接有效
### 4. 版本控制
- 将生成的文档提交到 Git
- 在 PR 中包含文档更新
- 保持文档与代码版本一致
## 故障排除
### 问题:生成的文档缺少内容
**原因**:源代码缺少 XML 注释
**解决方案**
1. 在源代码中添加 XML 注释
2. 重新生成文档
### 问题:验证失败
**原因**:文档格式不符合规范
**解决方案**
1. 查看验证错误信息
2. 根据提示修复问题
3. 重新验证
### 问题:链接损坏
**原因**:文件路径错误或文件不存在
**解决方案**
1. 检查链接的目标文件是否存在
2. 修正文件路径
3. 重新验证
### 问题:批量生成速度慢
**原因**:文件数量多
**解决方案**
1. 使用 `--parallel` 选项(如果支持)
2. 分批生成
3. 仅生成修改的文件
## 扩展开发
### 添加新 Skill
1. 在 `.claude/skills/` 下创建新目录
2. 创建 `SKILL.md` 说明文档
3. 创建必要的模板和脚本
4. 在本 README 中添加说明
### 修改现有 Skill
1. 更新 `SKILL.md` 文档
2. 修改模板或脚本
3. 更新示例文档
4. 测试修改后的功能
## 贡献指南
### 报告问题
在 GitHub Issues 中报告问题,包含:
- 使用的 skill 名称
- 输入参数
- 预期结果
- 实际结果
- 错误信息
### 提交改进
1. Fork 项目
2. 创建功能分支
3. 提交修改
4. 创建 Pull Request
## 版本历史
- v1.0.0 (2025-01-XX) - 初始版本
- 5 个核心 skills
- 3 个共享脚本
- 完整的文档和示例
## 许可证
与 GFramework 项目保持一致。
## 联系方式
如有问题或建议,请通过以下方式联系:
- GitHub Issues
- 项目讨论区
---
**注意**:本 skills 系统专为 GFramework 项目设计,使用前请确保了解项目结构和文档规范。

View File

@ -1,205 +0,0 @@
# GFramework 文档编写规范
## Markdown 语法规范
### 1. 泛型标记转义
在 Markdown 文档中,所有泛型标记必须转义,否则会被 VitePress 误认为 HTML 标签。
**错误示例**:
```markdown
`Option<T>` 是一个泛型类型
`Result<TValue, TError>` 表示结果
public class Repository<TData> { }
```
**正确示例**:
```markdown
`Option&lt;T&gt;` 是一个泛型类型
`Result&lt;TValue, TError&gt;` 表示结果
public class Repository&lt;TData&gt; { }
```
**常见泛型标记**:
- `<T>``&lt;T&gt;`
- `<TResult>``&lt;TResult&gt;`
- `<TValue>``&lt;TValue&gt;`
- `<TError>``&lt;TError&gt;`
- `<TSaveData>``&lt;TSaveData&gt;`
- `<TData>``&lt;TData&gt;`
- `<TNode>``&lt;TNode&gt;`
### 2. HTML 标签转义
如果需要在文档中显示 HTML 标签,必须转义:
- `<summary>``&lt;summary&gt;`
- `<param>``&lt;param&gt;`
- `<returns>``&lt;returns&gt;`
### 3. 链接验证
**内部链接规则**:
- 使用相对路径: `/zh-CN/core/events`
- 确保目标文件存在
- 不要链接到尚未创建的页面
**已存在的文档路径**:
**Core 模块**:
- `/zh-CN/core/architecture` - 架构系统
- `/zh-CN/core/ioc` - IoC 容器
- `/zh-CN/core/events` - 事件系统
- `/zh-CN/core/command` - 命令系统
- `/zh-CN/core/query` - 查询系统
- `/zh-CN/core/model` - Model 系统
- `/zh-CN/core/system` - System 系统
- `/zh-CN/core/utility` - Utility 系统
- `/zh-CN/core/controller` - Controller 系统
- `/zh-CN/core/logging` - 日志系统
- `/zh-CN/core/pool` - 对象池
- `/zh-CN/core/property` - 可绑定属性
- `/zh-CN/core/lifecycle` - 生命周期管理
- `/zh-CN/core/coroutine` - 协程系统
- `/zh-CN/core/resource` - 资源管理
- `/zh-CN/core/state-machine` - 状态机
- `/zh-CN/core/cqrs` - CQRS 与 Mediator
- `/zh-CN/core/functional` - 函数式编程
- `/zh-CN/core/pause` - 暂停管理
- `/zh-CN/core/configuration` - 配置管理
- `/zh-CN/core/ecs` - ECS 系统集成
- `/zh-CN/core/extensions` - 扩展方法
- `/zh-CN/core/rule` - 规则系统
- `/zh-CN/core/environment` - 环境系统
- `/zh-CN/core/context` - 上下文系统
- `/zh-CN/core/async-initialization` - 异步初始化
**Game 模块**:
- `/zh-CN/game/scene` - 场景系统
- `/zh-CN/game/ui` - UI 系统
- `/zh-CN/game/data` - 数据与存档
- `/zh-CN/game/storage` - 存储系统
- `/zh-CN/game/serialization` - 序列化系统
- `/zh-CN/game/setting` - 设置系统
**Godot 模块**:
- `/zh-CN/godot/architecture` - Godot 架构集成
- `/zh-CN/godot/scene` - Godot 场景系统
- `/zh-CN/godot/ui` - Godot UI 系统
- `/zh-CN/godot/pool` - Godot 节点池
- `/zh-CN/godot/resource` - Godot 资源仓储
- `/zh-CN/godot/logging` - Godot 日志系统
- `/zh-CN/godot/pause` - Godot 暂停处理
- `/zh-CN/godot/extensions` - Godot 扩展
- `/zh-CN/godot/coroutine` - Godot 协程
- `/zh-CN/godot/signal` - Godot 信号
- `/zh-CN/godot/storage` - Godot 存储
**教程**:
- `/zh-CN/tutorials/coroutine-tutorial` - 协程系统教程
- `/zh-CN/tutorials/state-machine-tutorial` - 状态机教程
- `/zh-CN/tutorials/resource-management` - 资源管理教程
- `/zh-CN/tutorials/save-system` - 存档系统教程
- `/zh-CN/tutorials/godot-complete-project` - Godot 完整项目
- `/zh-CN/tutorials/functional-programming` - 函数式编程实践
- `/zh-CN/tutorials/pause-system` - 暂停系统实现
- `/zh-CN/tutorials/data-migration` - 数据迁移实践
- `/zh-CN/tutorials/godot-integration` - Godot 集成
- `/zh-CN/tutorials/advanced-patterns` - 高级模式
**其他**:
- `/zh-CN/getting-started/quick-start` - 快速开始
- `/zh-CN/getting-started/installation` - 安装指南
- `/zh-CN/best-practices/architecture-patterns` - 架构模式
**不存在的路径** (不要链接):
- `/zh-CN/best-practices/performance` - 尚未创建
- `/zh-CN/core/serializer` - 错误路径,应使用 `/zh-CN/game/serialization`
## 代码块规范
### 1. 代码块语言标识
始终指定代码块的语言:
```markdown
\`\`\`csharp
public class Example { }
\`\`\`
\`\`\`bash
npm install
\`\`\`
```
### 2. 代码注释
代码示例应包含中文注释:
```csharp
// 创建玩家实体
var player = new Player
{
Name = "玩家1", // 玩家名称
Level = 1 // 初始等级
};
```
## Frontmatter 规范
每个文档必须包含正确的 frontmatter:
```yaml
---
title: 文档标题
description: 简短描述1-2 句话)
---
```
## 文档结构规范
### 指南文档结构
1. 概述
2. 核心概念
3. 基本用法
4. 高级用法
5. 最佳实践
6. 常见问题
7. 相关文档
### 教程文档结构
1. 学习目标
2. 前置条件
3. 步骤 1-N (3-7 步)
4. 完整代码
5. 运行结果
6. 下一步
7. 相关文档
## 验证清单
生成文档后,必须检查:
- [ ] 所有泛型标记已转义 (`<T>``&lt;T&gt;`)
- [ ] 所有内部链接指向存在的页面
- [ ] Frontmatter 格式正确
- [ ] 代码块指定了语言
- [ ] 代码包含中文注释
- [ ] 文档结构完整
- [ ] 没有 HTML 标签错误
## 自动修复脚本
如果文档已生成,可以使用以下脚本修复常见问题:
```bash
# 修复泛型标记
sed -i 's/<T>/\&lt;T\&gt;/g' file.md
sed -i 's/<TResult>/\&lt;TResult\&gt;/g' file.md
sed -i 's/<TValue>/\&lt;TValue\&gt;/g' file.md
sed -i 's/<TError>/\&lt;TError\&gt;/g' file.md
# 验证构建
cd docs && bun run build
```

View File

@ -1,84 +0,0 @@
#!/bin/bash
# 共享的模块配置
# 用于统一管理 GFramework 项目的模块映射关系
# 根据模块名获取源代码目录
get_source_dir() {
local MODULE="$1"
case "$MODULE" in
Core)
echo "GFramework.Core"
;;
Game)
echo "GFramework.Game"
;;
Godot)
echo "GFramework.Godot"
;;
SourceGenerators)
echo "GFramework.SourceGenerators"
;;
*)
echo ""
return 1
;;
esac
}
# 根据模块名获取文档输出目录
get_docs_dir() {
local MODULE="$1"
case "$MODULE" in
Core)
echo "docs/zh-CN/api-reference/core"
;;
Game)
echo "docs/zh-CN/api-reference/game"
;;
Godot)
echo "docs/zh-CN/api-reference/godot"
;;
SourceGenerators)
echo "docs/zh-CN/api-reference/source-generators"
;;
*)
echo ""
return 1
;;
esac
}
# 根据命名空间推断模块名
infer_module_from_namespace() {
local NAMESPACE="$1"
if [[ "$NAMESPACE" == GFramework.Core* ]]; then
echo "Core"
elif [[ "$NAMESPACE" == GFramework.Game* ]]; then
echo "Game"
elif [[ "$NAMESPACE" == GFramework.Godot* ]]; then
echo "Godot"
elif [[ "$NAMESPACE" == GFramework.SourceGenerators* ]]; then
echo "SourceGenerators"
else
echo ""
return 1
fi
}
# 获取所有可用模块列表
get_all_modules() {
echo "Core Game Godot SourceGenerators"
}
# 验证模块名是否有效
is_valid_module() {
local MODULE="$1"
case "$MODULE" in
Core|Game|Godot|SourceGenerators)
return 0
;;
*)
return 1
;;
esac
}

View File

@ -1,210 +0,0 @@
# VitePress API 文档生成
为单个 C# 类、接口或枚举生成符合 VitePress 标准的 API 参考文档。
## 用途
此 skill 用于从 C# 源代码文件自动生成结构化的 API 文档,包括:
- 类型概述和命名空间信息
- 构造函数、方法、属性的详细说明
- 基于 XML 文档注释的描述
- 自动生成的使用示例
- 相关类型的交叉引用
## 调用方式
```bash
/vitepress-api-doc <C# 文件路径>
```
**示例**
```bash
/vitepress-api-doc GFramework.Core/architecture/Architecture.cs
```
## 工作流程
1. **读取源代码文件**
- 验证文件存在且为 C# 文件
- 读取完整的源代码内容
2. **解析代码结构**
- 提取命名空间、类名、访问修饰符
- 识别类型class/interface/enum/struct
- 解析继承关系和实现的接口
- 提取所有公共成员(构造函数、方法、属性、事件、字段)
3. **提取 XML 文档注释**
- 解析 `/// <summary>` 标签(类型和成员描述)
- 解析 `/// <param>` 标签(参数说明)
- 解析 `/// <returns>` 标签(返回值说明)
- 解析 `/// <exception>` 标签(异常说明)
- 解析 `/// <example>` 标签(示例代码)
- 解析 `/// <see cref=""/>` 标签(交叉引用)
4. **生成 Markdown 文档**
- 根据 `template.md` 填充内容
- 转义泛型符号(`<T>``&lt;T&gt;`
- 生成使用示例(基于 API 签名)
- 添加相关文档链接
5. **确定输出路径**
- 根据命名空间确定模块Core/Game/Godot/SourceGenerators
- 输出到 `docs/zh-CN/api-reference/<模块>/<类名>.md`
6. **更新 VitePress 配置**
- 调用共享脚本 `update-vitepress-nav.sh`
- 在侧边栏配置中添加新文档条目
7. **验证文档质量**
- 检查 Frontmatter 格式
- 验证内部链接
- 确保代码块语法正确
## 输出规范
### Frontmatter 格式
```yaml
---
title: 类名
description: 从 XML <summary> 提取的简短描述
outline: deep
---
```
### 文档结构
1. **标题**:使用类名作为一级标题
2. **概述**XML summary 内容
3. **命名空间和程序集信息**
4. **继承链**(如果适用)
5. **构造函数**(如果有)
6. **公共方法**(按字母顺序)
7. **公共属性**(按字母顺序)
8. **公共事件**(如果有)
9. **使用示例**(自动生成)
10. **另请参阅**(相关类型链接)
### 代码块格式
所有 C# 代码块必须使用:
```markdown
\`\`\`csharp
// 代码内容
\`\`\`
```
### 泛型符号转义
- `List<T>``List&lt;T&gt;`
- `Dictionary<K, V>``Dictionary&lt;K, V&gt;`
- `IEnumerable<T>``IEnumerable&lt;T&gt;`
### 内部链接格式
- 相对路径:`[Architecture](./architecture.md)`
- 绝对路径:`[Core 架构](/zh-CN/core/architecture)`
- 锚点链接:`[构造函数](#构造函数)`
## 前置条件
1. 项目必须有 VitePress 配置文件(`docs/.vitepress/config.mts`
2. 目标 C# 文件必须存在且可读
3. C# 文件必须包含 XML 文档注释(`///`
4. 文件必须包含至少一个公共类型
## 配置选项
### 自动检测模块
根据命名空间自动确定模块:
- `GFramework.Core.*``core`
- `GFramework.Game.*``game`
- `GFramework.Godot.*``godot`
- `GFramework.SourceGenerators.*``source-generators`
### 示例生成策略
- **基本用法**:最简单的 API 调用
- **常见场景**:实际应用案例
- **高级用法**:复杂配置(如果适用)
## 示例输出
参考 `examples/` 目录中的示例文档:
- `class-example.md` - 类文档示例
- `interface-example.md` - 接口文档示例
- `enum-example.md` - 枚举文档示例
## 注意事项
1. **仅使用 XML 注释**:不对缺失的注释进行 AI 补充
2. **仅提取公共成员**:忽略 `internal``private``protected` 成员
3. **保持文档同步**:文档内容直接来源于代码,确保准确性
4. **遵循项目风格**:参考现有文档的格式和术语
## 相关 Skills
- `/vitepress-validate` - 验证生成的文档质量
- `/vitepress-batch-api` - 批量生成整个模块的 API 文档
## 技术细节
### XML 注释标签映射
| XML 标签 | Markdown 输出 |
|---------|--------------|
| `<summary>` | 概述章节 |
| `<param name="x">` | 参数列表 |
| `<returns>` | 返回值说明 |
| `<exception cref="T">` | 异常列表 |
| `<example>` | 示例代码块 |
| `<see cref="T"/>` | 内部链接 |
| `<remarks>` | 备注章节 |
### 成员签名格式
**方法**
```markdown
### MethodName
描述内容
**签名**
\`\`\`csharp
public ReturnType MethodName(ParamType param)
\`\`\`
**参数**
- `param` (ParamType): 参数说明
**返回值**
- (ReturnType): 返回值说明
```
**属性**
```markdown
### PropertyName
描述内容
**类型**`PropertyType`
**访问**get / set
```
## 故障排除
### 问题:找不到 XML 注释
**解决方案**:确保 C# 文件包含 `///` 注释,而不是 `//``/* */`
### 问题:泛型符号显示错误
**解决方案**VitePress 配置中已包含 `safeGenericEscapePlugin`,确保正确转义
### 问题:侧边栏未更新
**解决方案**:检查 `update-vitepress-nav.sh` 脚本是否正确执行
## 版本历史
- v1.0.0 - 初始版本,支持类、接口、枚举的文档生成

View File

@ -1,252 +0,0 @@
---
title: Architecture
description: 架构基类,提供系统、模型、工具等组件的注册与管理功能。专注于生命周期管理、初始化流程控制和架构阶段转换。
outline: deep
---
# Architecture
## 概述
架构基类,提供系统、模型、工具等组件的注册与管理功能。专注于生命周期管理、初始化流程控制和架构阶段转换。
**命名空间**`GFramework.Core.architecture`
**程序集**`GFramework.Core`
**继承**`Object``Architecture`
**实现**`IArchitecture`
## 构造函数
### Architecture
创建架构实例。
**签名**
```csharp
public Architecture(
IArchitectureConfiguration? configuration = null,
IEnvironment? environment = null,
IArchitectureServices? services = null,
IArchitectureContext? context = null
)
```
**参数**
- `configuration` (IArchitectureConfiguration?): 架构配置对象,为 null 时使用默认配置
- `environment` (IEnvironment?): 环境配置对象,为 null 时使用默认环境
- `services` (IArchitectureServices?): 架构服务对象,为 null 时创建新实例
- `context` (IArchitectureContext?): 架构上下文对象,为 null 时创建新实例
## 公共方法
### Initialize
同步初始化架构,阻塞当前线程直到初始化完成。
**签名**
```csharp
public void Initialize()
```
**特点**
- 阻塞式初始化
- 适用于简单场景或控制台应用
- 初始化失败时抛出异常并进入 `FailedInitialization` 阶段
### InitializeAsync
异步初始化架构,返回 Task 以便调用者可以等待初始化完成。
**签名**
```csharp
public async Task InitializeAsync()
```
**返回值**
- (Task): 表示异步初始化操作的任务
**特点**
- 非阻塞式初始化
- 支持异步组件初始化
- 适用于需要异步加载资源的场景
### InstallModule
安装架构模块,用于扩展架构功能。
**签名**
```csharp
public IArchitectureModule InstallModule(IArchitectureModule module)
```
**参数**
- `module` (IArchitectureModule): 要安装的模块实例
**返回值**
- (IArchitectureModule): 返回安装的模块实例
### RegisterSystem
注册系统组件到架构中。
**签名**
```csharp
public void RegisterSystem<TSystem>(TSystem system) where TSystem : ISystem
```
**类型参数**
- `TSystem`: 系统类型,必须实现 ISystem 接口
**参数**
- `system` (TSystem): 要注册的系统实例
### RegisterModel
注册模型组件到架构中。
**签名**
```csharp
public void RegisterModel<TModel>(TModel model) where TModel : IModel
```
**类型参数**
- `TModel`: 模型类型,必须实现 IModel 接口
**参数**
- `model` (TModel): 要注册的模型实例
### RegisterUtility
注册工具组件到架构中。
**签名**
```csharp
public void RegisterUtility<TUtility>(TUtility utility) where TUtility : IUtility
```
**类型参数**
- `TUtility`: 工具类型,必须实现 IUtility 接口
**参数**
- `utility` (TUtility): 要注册的工具实例
### SendCommand
发送并执行命令。
**签名**
```csharp
public void SendCommand(ICommand command)
```
**参数**
- `command` (ICommand): 要执行的命令实例
### SendCommand&lt;TResult&gt;
发送并执行带返回值的命令。
**签名**
```csharp
public TResult SendCommand<TResult>(ICommand<TResult> command)
```
**类型参数**
- `TResult`: 命令返回值类型
**参数**
- `command` (ICommand&lt;TResult&gt;): 要执行的命令实例
**返回值**
- (TResult): 命令执行结果
## 公共属性
### CurrentPhase
获取当前架构的阶段。
**类型**`ArchitecturePhase`
**访问**get
### Context
获取架构上下文,提供对架构服务的访问。
**类型**`IArchitectureContext`
**访问**get
### IsReady
获取一个布尔值,指示当前架构是否处于就绪状态。
**类型**`bool`
**访问**get
## 使用示例
### 基本用法
```csharp
// 1. 定义你的架构(继承 Architecture 基类)
public class GameArchitecture : Architecture
{
protected override void Init()
{
// 注册 Model
RegisterModel(new PlayerModel());
RegisterModel(new InventoryModel());
// 注册 System
RegisterSystem(new GameplaySystem());
RegisterSystem(new SaveSystem());
// 注册 Utility
RegisterUtility(new StorageUtility());
RegisterUtility(new TimeUtility());
}
}
// 2. 创建并初始化架构
var architecture = new GameArchitecture();
architecture.Initialize();
// 3. 等待架构就绪
await architecture.WaitUntilReadyAsync();
```
### 异步初始化
```csharp
var architecture = new GameArchitecture();
await architecture.InitializeAsync(); // 异步等待初始化完成
// 检查架构是否已就绪
if (architecture.IsReady)
{
Console.WriteLine("架构已就绪,可以开始游戏");
}
```
### 使用自定义配置
```csharp
var config = new ArchitectureConfiguration
{
ArchitectureProperties = new ArchitectureProperties
{
StrictPhaseValidation = true, // 启用严格阶段验证
AllowLateRegistration = false // 禁止就绪后注册组件
}
};
var architecture = new GameArchitecture(configuration: config);
architecture.Initialize();
```
## 另请参阅
- [IArchitecture](./iarchitecture.md) - 架构接口
- [ArchitecturePhase](./architecture-phase.md) - 架构阶段枚举
- [IArchitectureModule](./iarchitecture-module.md) - 架构模块接口
- [架构组件](/zh-CN/core/architecture) - 架构使用指南

View File

@ -1,193 +0,0 @@
---
title: ArchitecturePhase
description: 架构阶段枚举,定义了架构生命周期的各个阶段。
outline: deep
---
# ArchitecturePhase
## 概述
架构阶段枚举,定义了架构生命周期的各个阶段。
**命名空间**`GFramework.Core.Abstractions.enums`
**程序集**`GFramework.Core.Abstractions`
**基础类型**`Enum`
## 枚举值
### None
初始阶段,架构尚未开始初始化。
**值**`0`
### BeforeUtilityInit
工具初始化前阶段。
**值**`1`
### AfterUtilityInit
工具初始化后阶段。
**值**`2`
### BeforeModelInit
模型初始化前阶段。
**值**`3`
### AfterModelInit
模型初始化后阶段。
**值**`4`
### BeforeSystemInit
系统初始化前阶段。
**值**`5`
### AfterSystemInit
系统初始化后阶段。
**值**`6`
### Ready
就绪状态,架构已完全初始化并可以使用。
**值**`7`
### FailedInitialization
初始化失败状态。
**值**`8`
### Destroying
正在销毁阶段。
**值**`9`
### Destroyed
已销毁阶段。
**值**`10`
## 使用示例
### 检查架构阶段
```csharp
var architecture = new GameArchitecture();
architecture.Initialize();
// 检查架构是否已就绪
if (architecture.CurrentPhase == ArchitecturePhase.Ready)
{
Console.WriteLine("架构已就绪,可以开始游戏");
}
```
### 监听阶段变化
```csharp
public class PhaseMonitor : IArchitectureLifecycle
{
public void OnPhase(ArchitecturePhase phase, IArchitecture architecture)
{
switch (phase)
{
case ArchitecturePhase.BeforeUtilityInit:
Console.WriteLine("开始初始化工具");
break;
case ArchitecturePhase.AfterUtilityInit:
Console.WriteLine("工具初始化完成");
break;
case ArchitecturePhase.BeforeModelInit:
Console.WriteLine("开始初始化模型");
break;
case ArchitecturePhase.AfterModelInit:
Console.WriteLine("模型初始化完成");
break;
case ArchitecturePhase.BeforeSystemInit:
Console.WriteLine("开始初始化系统");
break;
case ArchitecturePhase.AfterSystemInit:
Console.WriteLine("系统初始化完成");
break;
case ArchitecturePhase.Ready:
Console.WriteLine("架构就绪");
break;
case ArchitecturePhase.FailedInitialization:
Console.WriteLine("架构初始化失败");
break;
case ArchitecturePhase.Destroying:
Console.WriteLine("架构正在销毁");
break;
case ArchitecturePhase.Destroyed:
Console.WriteLine("架构已销毁");
break;
}
}
}
// 注册监听器
var architecture = new GameArchitecture();
architecture.RegisterLifecycleHook(new PhaseMonitor());
architecture.Initialize();
```
### 等待特定阶段
```csharp
public async Task WaitForReady(IArchitecture architecture)
{
while (architecture.CurrentPhase != ArchitecturePhase.Ready)
{
if (architecture.CurrentPhase == ArchitecturePhase.FailedInitialization)
{
throw new Exception("架构初始化失败");
}
await Task.Delay(100);
}
Console.WriteLine("架构已就绪");
}
```
## 阶段转换顺序
正常初始化流程的阶段转换顺序:
1. `None``BeforeUtilityInit`
2. `BeforeUtilityInit``AfterUtilityInit`
3. `AfterUtilityInit``BeforeModelInit`
4. `BeforeModelInit``AfterModelInit`
5. `AfterModelInit``BeforeSystemInit`
6. `BeforeSystemInit``AfterSystemInit`
7. `AfterSystemInit``Ready`
销毁流程的阶段转换顺序:
1. `Ready``Destroying`
2. `Destroying``Destroyed`
异常流程:
- 任何阶段 → `FailedInitialization`(初始化过程中发生异常)
## 另请参阅
- [Architecture](./architecture.md) - 架构基类
- [IArchitectureLifecycle](./iarchitecture-lifecycle.md) - 生命周期钩子接口
- [架构组件](/zh-CN/core/architecture) - 架构使用指南

View File

@ -1,290 +0,0 @@
---
title: IArchitecture
description: 架构接口,定义了框架的核心功能契约。
outline: deep
---
# IArchitecture
## 概述
架构接口,定义了框架的核心功能契约。
**命名空间**`GFramework.Core.Abstractions.architecture`
**程序集**`GFramework.Core.Abstractions`
**实现类**[Architecture](./architecture.md)
## 公共方法
### RegisterSystem&lt;TSystem&gt;
注册系统组件到架构中。
**签名**
```csharp
void RegisterSystem<TSystem>(TSystem system) where TSystem : ISystem
```
**类型参数**
- `TSystem`: 系统类型,必须实现 ISystem 接口
**参数**
- `system` (TSystem): 要注册的系统实例
### RegisterModel&lt;TModel&gt;
注册模型组件到架构中。
**签名**
```csharp
void RegisterModel<TModel>(TModel model) where TModel : IModel
```
**类型参数**
- `TModel`: 模型类型,必须实现 IModel 接口
**参数**
- `model` (TModel): 要注册的模型实例
### RegisterUtility&lt;TUtility&gt;
注册工具组件到架构中。
**签名**
```csharp
void RegisterUtility<TUtility>(TUtility utility) where TUtility : IUtility
```
**类型参数**
- `TUtility`: 工具类型,必须实现 IUtility 接口
**参数**
- `utility` (TUtility): 要注册的工具实例
### GetModel&lt;T&gt;
从容器中获取已注册的模型。
**签名**
```csharp
T GetModel<T>() where T : class, IModel
```
**类型参数**
- `T`: 模型类型
**返回值**
- (T): 模型实例
### GetSystem&lt;T&gt;
从容器中获取已注册的系统。
**签名**
```csharp
T GetSystem<T>() where T : class, ISystem
```
**类型参数**
- `T`: 系统类型
**返回值**
- (T): 系统实例
### GetUtility&lt;T&gt;
从容器中获取已注册的工具。
**签名**
```csharp
T GetUtility<T>() where T : class, IUtility
```
**类型参数**
- `T`: 工具类型
**返回值**
- (T): 工具实例
### SendCommand
发送并执行命令。
**签名**
```csharp
void SendCommand(ICommand command)
```
**参数**
- `command` (ICommand): 要执行的命令实例
### SendCommand&lt;TResult&gt;
发送并执行带返回值的命令。
**签名**
```csharp
TResult SendCommand<TResult>(ICommand<TResult> command)
```
**类型参数**
- `TResult`: 命令返回值类型
**参数**
- `command` (ICommand&lt;TResult&gt;): 要执行的命令实例
**返回值**
- (TResult): 命令执行结果
### SendQuery&lt;TResult&gt;
发送并执行查询。
**签名**
```csharp
TResult SendQuery<TResult>(IQuery<TResult> query)
```
**类型参数**
- `TResult`: 查询返回值类型
**参数**
- `query` (IQuery&lt;TResult&gt;): 要执行的查询实例
**返回值**
- (TResult): 查询结果
### SendEvent&lt;T&gt;
发送事件(无参数)。
**签名**
```csharp
void SendEvent<T>() where T : new()
```
**类型参数**
- `T`: 事件类型,必须有无参构造函数
### SendEvent&lt;T&gt;
发送事件(带参数)。
**签名**
```csharp
void SendEvent<T>(T e)
```
**类型参数**
- `T`: 事件类型
**参数**
- `e` (T): 事件实例
### RegisterEvent&lt;T&gt;
注册事件监听器。
**签名**
```csharp
IUnRegister RegisterEvent<T>(Action<T> onEvent)
```
**类型参数**
- `T`: 事件类型
**参数**
- `onEvent` (Action&lt;T&gt;): 事件处理回调
**返回值**
- (IUnRegister): 用于注销事件的对象
### UnRegisterEvent&lt;T&gt;
注销事件监听器。
**签名**
```csharp
void UnRegisterEvent<T>(Action<T> onEvent)
```
**类型参数**
- `T`: 事件类型
**参数**
- `onEvent` (Action&lt;T&gt;): 要注销的事件处理回调
## 公共属性
### CurrentPhase
获取当前架构的阶段。
**类型**`ArchitecturePhase`
**访问**get
### Context
获取架构上下文。
**类型**`IArchitectureContext`
**访问**get
## 使用示例
### 在 Controller 中使用
```csharp
public class GameController : IController
{
public IArchitecture GetArchitecture() => GameArchitecture.Interface;
public void Start()
{
// 获取 Model
var playerModel = this.GetModel<PlayerModel>();
// 发送命令
this.SendCommand(new StartGameCommand());
// 发送查询
var score = this.SendQuery(new GetScoreQuery());
// 注册事件
this.RegisterEvent<PlayerDiedEvent>(OnPlayerDied);
}
private void OnPlayerDied(PlayerDiedEvent e)
{
// 处理玩家死亡事件
}
}
```
### 实现自定义架构
```csharp
public class GameArchitecture : Architecture
{
// 单例访问
public static IArchitecture Interface { get; private set; }
protected override void Init()
{
Interface = this;
// 注册组件
RegisterModel(new PlayerModel());
RegisterSystem(new GameplaySystem());
RegisterUtility(new StorageUtility());
}
}
```
## 另请参阅
- [Architecture](./architecture.md) - 架构基类实现
- [IModel](./imodel.md) - 模型接口
- [ISystem](./isystem.md) - 系统接口
- [IUtility](./iutility.md) - 工具接口
- [架构组件](/zh-CN/core/architecture) - 架构使用指南

View File

@ -1,37 +0,0 @@
---
title: {{CLASS_NAME}}
description: {{XML_SUMMARY}}
outline: deep
---
# {{CLASS_NAME}}
## 概述
{{XML_SUMMARY}}
**命名空间**`{{NAMESPACE}}`
**程序集**`{{ASSEMBLY}}`
{{INHERITANCE_CHAIN}}
## 构造函数
{{CONSTRUCTORS}}
## 公共方法
{{PUBLIC_METHODS}}
## 公共属性
{{PUBLIC_PROPERTIES}}
{{PUBLIC_EVENTS}}
## 使用示例
{{AUTO_GENERATED_EXAMPLES}}
## 另请参阅
{{RELATED_TYPES}}

View File

@ -1,364 +0,0 @@
# VitePress 批量 API 文档生成
为整个模块批量生成 API 参考文档,提高文档生成效率。
## 用途
此 skill 用于批量生成模块的 API 文档,适用于:
- 初始化模块文档
- 更新整个模块的文档
- 为新模块快速生成文档
- 重新生成所有 API 文档
## 调用方式
```bash
/vitepress-batch-api <模块名>
```
**示例**
```bash
/vitepress-batch-api Core
/vitepress-batch-api Game
/vitepress-batch-api Godot
/vitepress-batch-api SourceGenerators
```
## 工作流程
1. **扫描模块目录**
- 根据模块名确定源代码目录
- 递归扫描所有 C# 文件
2. **过滤目标文件**
- 仅包含公共类型public class/interface/enum/struct
- 排除内部类型internal
- 排除生成的代码(*.g.cs、*.Designer.cs
- 排除测试文件(*.Tests.cs
3. **批量生成文档**
- 为每个类型调用 `/vitepress-api-doc`
- 显示进度信息
- 收集生成结果
4. **生成模块索引页**
- 创建 `index.md` 列出所有 API
- 按类别分组(类、接口、枚举)
- 添加简短描述
5. **批量更新导航**
- 在 VitePress 配置中添加所有新文档
- 保持字母顺序
- 更新模块索引
6. **生成摘要报告**
- 统计生成的文档数量
- 列出成功和失败的文件
- 提供验证建议
## 输出规范
### 模块索引页格式
```markdown
---
title: Core API 参考
description: GFramework.Core 模块的 API 参考文档
---
# Core API 参考
## 概述
GFramework.Core 是框架的核心模块,提供架构基础、依赖注入、事件系统等核心功能。
## 类
- [Architecture](./architecture.md) - 架构基类
- [ArchitectureConfiguration](./architecture-configuration.md) - 架构配置
- [IocContainer](./ioc-container.md) - IoC 容器
## 接口
- [IArchitecture](./iarchitecture.md) - 架构接口
- [IModel](./imodel.md) - 模型接口
- [ISystem](./isystem.md) - 系统接口
## 枚举
- [ArchitecturePhase](./architecture-phase.md) - 架构阶段
```
### 目录结构
```
docs/zh-CN/api-reference/
├── core/
│ ├── index.md # 模块索引
│ ├── architecture.md
│ ├── iarchitecture.md
│ └── ...
├── game/
│ ├── index.md
│ └── ...
└── godot/
├── index.md
└── ...
```
## 模块映射
### 源代码目录映射
| 模块名 | 源代码目录 | 输出目录 |
|--------|-----------|---------|
| Core | `GFramework.Core/` | `docs/zh-CN/api-reference/core/` |
| Game | `GFramework.Game/` | `docs/zh-CN/api-reference/game/` |
| Godot | `GFramework.Godot/` | `docs/zh-CN/api-reference/godot/` |
| SourceGenerators | `GFramework.SourceGenerators/` | `docs/zh-CN/api-reference/source-generators/` |
### 命名空间映射
- `GFramework.Core.*` → Core 模块
- `GFramework.Game.*` → Game 模块
- `GFramework.Godot.*` → Godot 模块
- `GFramework.SourceGenerators.*` → SourceGenerators 模块
## 过滤规则
### 包含的文件
- 公共类public class
- 公共接口public interface
- 公共枚举public enum
- 公共结构体public struct
### 排除的文件
- 内部类型internal
- 生成的代码(`*.g.cs``*.Designer.cs`
- 测试文件(`*.Tests.cs``*Test.cs`
- 临时文件(`*.tmp.cs`
- 编译器生成的文件(`AssemblyInfo.cs`
### 排除的类型
- 编译器生成的类型(`<>c__DisplayClass`
- 匿名类型
- 嵌套的私有类型
## 批量处理脚本
### batch-generate.sh
```bash
#!/bin/bash
# 批量生成 API 文档
# 用法: batch-generate.sh <模块名>
set -e
MODULE="$1"
if [ -z "$MODULE" ]; then
echo "用法: $0 <模块名>"
echo "可用模块: Core, Game, Godot, SourceGenerators"
exit 1
fi
# 确定源代码目录
case "$MODULE" in
Core)
SOURCE_DIR="GFramework.Core"
;;
Game)
SOURCE_DIR="GFramework.Game"
;;
Godot)
SOURCE_DIR="GFramework.Godot"
;;
SourceGenerators)
SOURCE_DIR="GFramework.SourceGenerators"
;;
*)
echo "错误: 未知的模块: $MODULE"
exit 1
;;
esac
if [ ! -d "$SOURCE_DIR" ]; then
echo "错误: 源代码目录不存在: $SOURCE_DIR"
exit 1
fi
echo "=========================================="
echo "批量生成 $MODULE 模块的 API 文档"
echo "=========================================="
echo ""
# 查找所有 C# 文件
FILES=$(find "$SOURCE_DIR" -name "*.cs" -type f \
! -name "*.g.cs" \
! -name "*.Designer.cs" \
! -name "*Test.cs" \
! -name "*.Tests.cs" \
! -name "AssemblyInfo.cs")
FILE_COUNT=$(echo "$FILES" | wc -l)
echo "找到 $FILE_COUNT 个文件"
echo ""
GENERATED=0
SKIPPED=0
FAILED=0
for FILE in $FILES; do
echo "处理: $FILE"
# 检查是否包含公共类型
if ! grep -q "public \(class\|interface\|enum\|struct\)" "$FILE"; then
echo " ⊘ 跳过(无公共类型)"
SKIPPED=$((SKIPPED + 1))
continue
fi
# 调用 vitepress-api-doc由 AI 执行)
# /vitepress-api-doc "$FILE"
if [ $? -eq 0 ]; then
echo " ✓ 生成成功"
GENERATED=$((GENERATED + 1))
else
echo " ✗ 生成失败"
FAILED=$((FAILED + 1))
fi
echo ""
done
echo "=========================================="
echo "批量生成完成"
echo "=========================================="
echo "总文件数: $FILE_COUNT"
echo "生成成功: $GENERATED"
echo "跳过: $SKIPPED"
echo "失败: $FAILED"
echo ""
if [ $FAILED -eq 0 ]; then
echo "✓ 所有文档生成成功"
exit 0
else
echo "✗ 部分文档生成失败"
exit 1
fi
```
## 配置选项
### 过滤选项
```bash
# 包含内部类型
/vitepress-batch-api Core --include-internal
# 包含生成的代码
/vitepress-batch-api Core --include-generated
# 自定义过滤规则
/vitepress-batch-api Core --exclude "*.Tests.cs" --exclude "*.g.cs"
```
### 输出选项
```bash
# 指定输出目录
/vitepress-batch-api Core --output docs/zh-CN/api-reference/core/
# 覆盖现有文档
/vitepress-batch-api Core --force
# 仅生成索引页
/vitepress-batch-api Core --index-only
```
### 并行处理
```bash
# 并行生成(加快速度)
/vitepress-batch-api Core --parallel 4
```
## 进度显示
### 实时进度
```
========================================
批量生成 Core 模块的 API 文档
========================================
找到 45 个文件
[1/45] 处理: GFramework.Core/architecture/Architecture.cs
✓ 生成成功
[2/45] 处理: GFramework.Core/architecture/IArchitecture.cs
✓ 生成成功
[3/45] 处理: GFramework.Core/command/Command.cs
⊘ 跳过(无公共类型)
...
[45/45] 处理: GFramework.Core/utility/Utility.cs
✓ 生成成功
========================================
批量生成完成
========================================
总文件数: 45
生成成功: 38
跳过: 5
失败: 2
✗ 部分文档生成失败
失败的文件:
- GFramework.Core/internal/InternalClass.cs (缺少 XML 注释)
- GFramework.Core/legacy/LegacyClass.cs (解析错误)
```
## 前置条件
1. 模块源代码目录存在
2. 源代码文件包含 XML 文档注释
3. 有足够的磁盘空间存储生成的文档
## 相关 Skills
- `/vitepress-api-doc` - 单文件 API 文档生成
- `/vitepress-validate` - 验证生成的文档
- `/vitepress-guide` - 生成功能指南
## 最佳实践
1. **首次生成**:使用批量生成快速创建所有文档
2. **增量更新**:修改代码后使用单文件生成更新对应文档
3. **定期验证**:批量生成后运行验证确保质量
4. **版本控制**:将生成的文档提交到版本控制系统
## 故障排除
### 问题:部分文件生成失败
**解决方案**:检查失败文件的 XML 注释是否完整,手动修复后重新生成
### 问题:生成速度慢
**解决方案**:使用 `--parallel` 选项启用并行处理
### 问题:生成的文档过多
**解决方案**:使用过滤选项排除不需要的文件
## 版本历史
- v1.0.0 - 初始版本,支持批量 API 文档生成

View File

@ -1,81 +0,0 @@
#!/bin/bash
# 批量生成 API 文档
# 用法: batch-generate.sh <模块名>
set -e
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
# shellcheck source=../../_shared/module-config.sh
source "$SCRIPT_DIR/../../_shared/module-config.sh"
MODULE="$1"
if [ -z "$MODULE" ]; then
echo "用法: $0 <模块名>"
echo "可用模块: $(get_all_modules)"
exit 1
fi
# 验证模块名
if ! is_valid_module "$MODULE"; then
echo "错误: 未知的模块: $MODULE"
echo "可用模块: $(get_all_modules)"
exit 1
fi
# 获取源代码目录
SOURCE_DIR=$(get_source_dir "$MODULE")
if [ ! -d "$SOURCE_DIR" ]; then
echo "错误: 源代码目录不存在: $SOURCE_DIR"
exit 1
fi
echo "=========================================="
echo "批量生成 $MODULE 模块的 API 文档"
echo "=========================================="
echo ""
# 查找所有 C# 文件
mapfile -t FILES < <(find "$SOURCE_DIR" -name "*.cs" -type f \
! -name "*.g.cs" \
! -name "*.Designer.cs" \
! -name "*Test.cs" \
! -name "*.Tests.cs" \
! -name "AssemblyInfo.cs")
FILE_COUNT=${#FILES[@]}
echo "找到 $FILE_COUNT 个文件"
echo ""
GENERATED=0
SKIPPED=0
FAILED=0
for FILE in "${FILES[@]}"; do
echo "处理: $FILE"
# 检查是否包含公共类型
if ! grep -q "public \(class\|interface\|enum\|struct\)" "$FILE"; then
echo " ⊘ 跳过(无公共类型)"
SKIPPED=$((SKIPPED + 1))
continue
fi
# 注意: 实际的文档生成由 AI 调用 /vitepress-api-doc 完成
# 此脚本仅用于扫描和过滤文件
echo " → 待生成"
GENERATED=$((GENERATED + 1))
echo ""
done
echo "=========================================="
echo "扫描完成"
echo "=========================================="
echo "总文件数: $FILE_COUNT"
echo "待生成: $GENERATED"
echo "跳过: $SKIPPED"
echo ""
exit 0

View File

@ -1,52 +0,0 @@
---
name: vitepress-doc-generator
description: Generate standardized VitePress documentation from source code.
disable-model-invocation: true
---
# Role
You are a technical documentation generator specialized in VitePress.
# Objective
Analyze the provided code context and generate a structured VitePress-compatible Markdown document.
# Output Requirements
1. Output MUST be valid Markdown only.
2. Include frontmatter:
---
title: <Module Name>
outline: deep
---
3. No explanations.
4. No conversational text.
5. No emoji.
6. Use Chinese.
7. Use structured headings.
# Required Structure
# 模块概述
- 模块职责
- 设计目标
# 核心类说明
## 类名
### 职责
### 主要方法
### 依赖关系
# 设计模式分析
# 可扩展性说明
# 使用示例(如适用)
# Self-Validation
Before returning output, verify:
- Frontmatter exists
- All required sections exist
- No extra commentary text

View File

@ -1,256 +0,0 @@
# VitePress 功能指南生成
生成功能模块的使用指南文档,包括概念说明、用法示例和最佳实践。
## 用途
此 skill 用于生成结构化的功能指南文档,适用于:
- 核心功能模块的使用说明
- 设计模式和架构概念
- 系统功能的详细介绍
- 最佳实践和常见问题
## 调用方式
```bash
/vitepress-guide <主题> <目标模块>
```
**示例**
```bash
/vitepress-guide "事件系统" Core
/vitepress-guide "IoC 容器" Core
/vitepress-guide "Godot 节点扩展" Godot
```
## 工作流程
1. **收集需求**
- 询问用户指南主题
- 确定目标受众(初学者/进阶/专家)
- 了解重点内容(概念/用法/最佳实践)
2. **搜索相关资源**
- 搜索相关代码文件
- 查找现有文档
- 识别相关类型和接口
3. **生成指南结构**
- 根据 `template.md` 创建文档框架
- 填充概述和核心概念
- 添加基本用法和高级用法
- 补充最佳实践和常见问题
4. **生成代码示例**
- 基本用法示例(最简单的场景)
- 常见场景示例(实际应用)
- 高级用法示例(复杂配置)
5. **确定输出路径**
- 保存到 `docs/zh-CN/<模块>/`
- 文件名使用小写加连字符(如 `event-system.md`
6. **更新导航配置**
- 在 VitePress 侧边栏中添加新指南
## 输出规范
### Frontmatter 格式
```yaml
---
title: 指南标题
description: 简短描述1-2 句话)
---
```
### 文档结构
1. **概述**:功能的简介和用途
2. **核心概念**:关键概念和术语解释
3. **基本用法**:最简单的使用方式
4. **高级用法**:复杂场景和配置
5. **最佳实践**:推荐的使用方式
6. **常见问题**FAQ 和故障排除
### 章节示例
**概述**
```markdown
## 概述
事件系统提供了一种松耦合的组件间通信机制。通过事件,不同的组件可以在不直接引用彼此的情况下进行交互。
**主要特性**
- 类型安全的事件
- 自动内存管理
- 支持事件优先级
- 线程安全
```
**核心概念**
```markdown
## 核心概念
### 事件类型
事件是一个普通的 C# 类,用于携带事件数据:
\`\`\`csharp
public class PlayerDiedEvent
{
public int PlayerId { get; set; }
public string Reason { get; set; }
}
\`\`\`
### 事件发送
通过架构发送事件:
\`\`\`csharp
this.SendEvent(new PlayerDiedEvent
{
PlayerId = 1,
Reason = "Fall damage"
});
\`\`\`
### 事件监听
注册事件监听器:
\`\`\`csharp
this.RegisterEvent<PlayerDiedEvent>(OnPlayerDied);
\`\`\`
```
## 模板变量
- `{{GUIDE_TITLE}}` - 指南标题
- `{{GUIDE_DESCRIPTION}}` - 简短描述
- `{{OVERVIEW}}` - 概述内容
- `{{CORE_CONCEPTS}}` - 核心概念
- `{{BASIC_USAGE}}` - 基本用法
- `{{ADVANCED_USAGE}}` - 高级用法
- `{{BEST_PRACTICES}}` - 最佳实践
- `{{FAQ}}` - 常见问题
## 示例输出
参考 `examples/guide-example.md`,该示例基于现有的 IoC 容器文档创建。
## 内容要求
### 概述部分
- 1-2 段简介
- 列出主要特性3-5 个)
- 说明适用场景
### 核心概念部分
- 使用三级标题(###)分隔不同概念
- 每个概念包含简短说明和代码示例
- 解释关键术语
### 基本用法部分
- 提供完整的可运行示例
- 从最简单的场景开始
- 逐步增加复杂度
- 包含必要的 using 语句
### 高级用法部分
- 展示复杂场景
- 说明配置选项
- 提供性能优化建议
### 最佳实践部分
- 使用编号列表
- 每条实践包含简短说明
- 提供正反示例(✓ 推荐 / ✗ 不推荐)
### 常见问题部分
- 使用问答格式
- 提供具体的解决方案
- 包含相关链接
## 写作风格
### 语气
- 友好、专业
- 使用第二人称("你"
- 避免过于技术化的术语
### 代码示例
- 完整且可运行
- 包含注释说明关键步骤
- 使用有意义的变量名
- 遵循项目代码风格
### 格式
- 使用 Markdown 标准格式
- 代码块使用语法高亮
- 重要内容使用粗体或引用块
- 适当使用列表和表格
## 配置选项
### 目标受众
```bash
# 初学者(更多解释,简单示例)
/vitepress-guide "事件系统" Core --audience beginner
# 进阶(平衡解释和示例)
/vitepress-guide "事件系统" Core --audience intermediate
# 专家(简洁说明,复杂示例)
/vitepress-guide "事件系统" Core --audience expert
```
### 重点内容
```bash
# 侧重概念
/vitepress-guide "事件系统" Core --focus concepts
# 侧重用法
/vitepress-guide "事件系统" Core --focus usage
# 侧重最佳实践
/vitepress-guide "事件系统" Core --focus best-practices
```
## 前置条件
1. 了解指南主题的基本概念
2. 能够访问相关代码文件
3. 了解项目的代码风格和术语
## 相关 Skills
- `/vitepress-api-doc` - 生成 API 参考文档
- `/vitepress-tutorial` - 生成分步教程
- `/vitepress-validate` - 验证生成的文档
## 最佳实践
1. **先搜索后编写**:查看现有文档和代码,保持一致性
2. **使用真实示例**:基于项目实际代码创建示例
3. **保持简洁**:每个章节聚焦一个主题
4. **提供完整代码**:确保示例可以直接运行
5. **添加交叉引用**:链接到相关的 API 文档和其他指南
## 故障排除
### 问题:不确定指南应该包含哪些内容
**解决方案**:参考 `examples/guide-example.md` 和现有的指南文档
### 问题:代码示例过于复杂
**解决方案**:将复杂示例拆分为多个简单示例,逐步增加复杂度
### 问题:概念解释不清晰
**解决方案**:使用类比、图表或分步说明来辅助解释
## 版本历史
- v1.0.0 - 初始版本,支持功能指南生成

View File

@ -1,283 +0,0 @@
---
title: IoC 容器使用指南
description: IoC控制反转容器提供了轻量级的依赖注入功能用于管理框架中各种组件的注册和获取。
---
# IoC 容器使用指南
## 概述
IoCInversion of Control控制反转包提供了一个轻量级的依赖注入容器用于管理框架中各种组件的注册和获取。通过 IoC 容器,可以实现组件间的解耦,便于测试和维护。
IoC 容器是 GFramework 架构的核心组件之一,为整个框架提供依赖管理和组件解析服务。
**主要特性**
- 类型安全的依赖管理
- 支持单例和多实例注册
- 线程安全操作
- 容器冻结保护
- 自动接口注册
## 核心概念
### 依赖注入
依赖注入是一种设计模式,通过容器管理对象的创建和依赖关系,而不是在代码中直接创建对象。
```csharp
// 不使用依赖注入
public class GameController
{
private PlayerModel model = new PlayerModel(); // 硬编码依赖
}
// 使用依赖注入
public class GameController : IController
{
public IArchitecture GetArchitecture() => GameArchitecture.Interface;
public void Start()
{
var model = this.GetModel<PlayerModel>(); // 从容器获取
}
}
```
### 容器注册
在架构初始化时,将组件注册到容器中:
```csharp
public class GameArchitecture : Architecture
{
protected override void Init()
{
// 注册 Model
RegisterModel(new PlayerModel());
// 注册 System
RegisterSystem(new GameplaySystem());
// 注册 Utility
RegisterUtility(new StorageUtility());
}
}
```
### 容器解析
通过扩展方法从容器中获取已注册的组件:
```csharp
// 在 Controller 中
var playerModel = this.GetModel<PlayerModel>();
var gameplaySystem = this.GetSystem<GameplaySystem>();
var storageUtility = this.GetUtility<StorageUtility>();
```
## 基本用法
### 注册组件
```csharp
var container = new IocContainer();
// 注册单例(一个类型只能有一个实例)
container.RegisterSingleton<IPlayerModel>(new PlayerModel());
// 注册多实例(一个类型可以有多个实例)
container.RegisterPlurality<IEnemy>(new Goblin());
container.RegisterPlurality<IEnemy>(new Orc());
container.RegisterPlurality<IEnemy>(new Dragon());
```
### 获取组件
```csharp
// 获取单例
var playerModel = container.Get<IPlayerModel>();
// 获取多实例集合
var enemies = container.GetAll<IEnemy>(); // 返回 List<IEnemy>
```
### 在架构中使用
```csharp
public class GameArchitecture : Architecture
{
protected override void Init()
{
// 注册组件
RegisterModel(new PlayerModel());
RegisterModel(new InventoryModel());
RegisterSystem(new GameplaySystem());
}
}
// 在 Controller 中使用
public class GameController : IController
{
public IArchitecture GetArchitecture() => GameArchitecture.Interface;
public void Start()
{
// 通过扩展方法获取组件
var playerModel = this.GetModel<PlayerModel>();
var inventoryModel = this.GetModel<InventoryModel>();
var gameplaySystem = this.GetSystem<GameplaySystem>();
}
}
```
## 高级用法
### 容器冻结
容器在架构初始化完成后会被冻结,防止运行时修改:
```csharp
var container = new IocContainer();
container.Register<IPlayerModel>(new PlayerModel());
// 冻结容器
container.Freeze();
// 以下操作会抛出 InvalidOperationException
// container.Register<IGameSystem>(new GameSystem());
```
### 多实例管理
```csharp
// 注册多个同类型实例
container.RegisterPlurality<IWeapon>(new Sword());
container.RegisterPlurality<IWeapon>(new Bow());
container.RegisterPlurality<IWeapon>(new Staff());
// 获取所有实例
var allWeapons = container.GetAll<IWeapon>();
foreach (var weapon in allWeapons)
{
weapon.Attack();
}
```
### 接口自动注册
注册实例时,容器会自动将其注册到所有实现的接口:
```csharp
public class PlayerModel : IModel, IPlayerModel, IDisposable
{
// ...
}
// 注册实例
container.Register<PlayerModel>(new PlayerModel());
// 可以通过任何接口获取
var model1 = container.Get<IModel>();
var model2 = container.Get<IPlayerModel>();
var model3 = container.Get<IDisposable>();
// 以上三个变量指向同一个实例
```
### 线程安全操作
容器的所有操作都是线程安全的:
```csharp
// 多线程环境下安全使用
Parallel.For(0, 100, i =>
{
var model = container.Get<IPlayerModel>();
model.DoSomething();
});
```
## 最佳实践
1. **使用接口注册**:优先使用接口类型注册,而不是具体类型
```csharp
✓ container.Register<IPlayerModel>(new PlayerModel());
✗ container.Register<PlayerModel>(new PlayerModel());
```
2. **单例 vs 多实例**:根据需求选择合适的注册方式
- 单例:全局唯一的服务(如配置、管理器)
- 多实例:可以有多个实例的对象(如敌人、道具)
3. **避免循环依赖**:组件之间不应该相互依赖
```csharp
✗ System A 依赖 System BSystem B 又依赖 System A
✓ 使用事件系统进行通信,避免直接依赖
```
4. **在 Init 中注册**:所有组件应该在架构的 `Init()` 方法中注册
```csharp
protected override void Init()
{
// 在这里注册所有组件
RegisterModel(new PlayerModel());
RegisterSystem(new GameplaySystem());
}
```
5. **使用扩展方法**:通过扩展方法获取组件,代码更简洁
```csharp
✓ var model = this.GetModel<PlayerModel>();
✗ var model = this.GetArchitecture().GetModel<PlayerModel>();
```
6. **不要在运行时注册**:容器冻结后不应该再注册新组件
```csharp
✗ 在游戏运行时动态注册组件
✓ 在架构初始化时注册所有需要的组件
```
## 常见问题
### 问题:如何判断使用单例还是多实例?
**解答**
- 使用单例(`RegisterSingleton`):全局唯一的服务,如 PlayerModel、GameConfiguration
- 使用多实例(`RegisterPlurality`):可以有多个实例的对象,如 Enemy、Weapon
### 问题:容器冻结后如何添加新组件?
**解答**
容器冻结是为了保护架构稳定性。如果需要动态添加组件,应该:
1. 在架构初始化时预先注册所有可能需要的组件
2. 使用对象池模式管理动态对象
3. 考虑使用工厂模式创建临时对象
### 问题:如何处理组件的生命周期?
**解答**
- 实现 `IDisposable` 接口的组件会在架构销毁时自动释放
- 架构会按注册的逆序销毁组件
- 不需要手动管理组件的生命周期
### 问题:可以在容器中注册值类型吗?
**解答**
可以,但会发生装箱。建议将值类型包装在类中:
```csharp
// 不推荐
container.Register<int>(42);
// 推荐
public class GameConfig
{
public int MaxPlayers { get; set; } = 42;
}
container.Register<GameConfig>(new GameConfig());
```
## 相关文档
- [架构组件](/zh-CN/core/architecture) - 架构基础
- [Model 层](/zh-CN/core/model) - 数据模型
- [System 层](/zh-CN/core/system) - 业务系统
- [Utility 工具类](/zh-CN/core/utility) - 工具类

View File

@ -1,34 +0,0 @@
---
title: {{GUIDE_TITLE}}
description: {{GUIDE_DESCRIPTION}}
---
# {{GUIDE_TITLE}}
## 概述
{{OVERVIEW}}
## 核心概念
{{CORE_CONCEPTS}}
## 基本用法
{{BASIC_USAGE}}
## 高级用法
{{ADVANCED_USAGE}}
## 最佳实践
{{BEST_PRACTICES}}
## 常见问题
{{FAQ}}
## 相关文档
{{RELATED_DOCS}}

View File

@ -1,253 +0,0 @@
# VitePress 教程生成
生成分步教程文档,适合初学者学习框架功能。
## 用途
此 skill 用于生成结构化的分步教程,适用于:
- 框架入门教程
- 功能实现教程
- 最佳实践演示
- 问题解决方案
## 调用方式
```bash
/vitepress-tutorial <教程主题>
```
**示例**
```bash
/vitepress-tutorial "创建第一个 System"
/vitepress-tutorial "实现自定义命令"
/vitepress-tutorial "使用事件系统"
```
## 工作流程
1. **收集需求**
- 询问用户教程主题
- 确定学习目标
- 了解前置知识要求
2. **设计教程步骤**
- 将任务分解为 3-7 个步骤
- 每步聚焦一个具体任务
- 确保步骤之间逻辑连贯
3. **生成教程内容**
- 根据 `template.md` 创建文档框架
- 为每步编写详细说明和代码
- 添加完整的可运行代码
- 说明预期结果
4. **确定输出路径**
- 保存到 `docs/zh-CN/tutorials/`
- 文件名使用小写加连字符
5. **更新导航配置**
- 在 VitePress 侧边栏中添加新教程
## 输出规范
### Frontmatter 格式
```yaml
---
title: 教程标题
description: 简短描述1 句话说明学习内容)
---
```
### 文档结构
1. **学习目标**:完成教程后能够掌握的技能
2. **前置条件**:需要的前置知识和环境
3. **步骤 1-N**分步说明3-7 步)
4. **完整代码**:汇总所有代码
5. **运行结果**:预期输出和效果
6. **下一步**:后续学习建议
### 步骤格式
每个步骤应包含:
- 步骤标题(简短、动词开头)
- 步骤说明(为什么要这样做)
- 代码示例(完整且可运行)
- 代码解释(关键部分的说明)
**示例**
```markdown
## 步骤 1创建 Model 类
首先,我们需要创建一个 Model 来存储玩家数据。Model 负责管理应用的数据和状态。
\`\`\`csharp
using GFramework.Core.Abstractions.model;
using GFramework.Core.Abstractions.property;
public class PlayerModel : IModel
{
// 玩家名称(可绑定属性)
public BindableProperty<string> Name { get; } = new("Player");
// 玩家生命值
public BindableProperty<int> Health { get; } = new(100);
// 玩家金币
public BindableProperty<int> Gold { get; } = new(0);
public void Init() { }
}
\`\`\`
**代码说明**
- `BindableProperty<T>` 是可绑定属性,值变化时会自动通知监听者
- `Init()` 方法在 Model 注册到架构时被调用
- 使用属性初始化器设置默认值
```
## 模板变量
- `{{TUTORIAL_TITLE}}` - 教程标题
- `{{TUTORIAL_DESCRIPTION}}` - 简短描述
- `{{LEARNING_OBJECTIVES}}` - 学习目标
- `{{PREREQUISITES}}` - 前置条件
- `{{STEP_N_TITLE}}` - 步骤标题
- `{{STEP_N_CONTENT}}` - 步骤内容
- `{{FULL_CODE}}` - 完整代码
- `{{EXPECTED_OUTPUT}}` - 预期输出
- `{{NEXT_STEPS}}` - 下一步建议
## 示例输出
参考 `examples/tutorial-example.md`,该示例基于现有的教程文档创建。
## 内容要求
### 学习目标
- 使用列表格式
- 3-5 个具体的学习目标
- 使用"能够..."句式
**示例**
```markdown
## 学习目标
完成本教程后,你将能够:
- 创建自定义的 Model 类
- 在架构中注册 Model
- 从 Controller 中访问 Model
- 使用可绑定属性管理数据
```
### 前置条件
- 列出必需的知识
- 说明环境要求
- 提供相关文档链接
**示例**
```markdown
## 前置条件
- 已安装 GFramework.Core NuGet 包
- 了解 C# 基础语法
- 阅读过[架构概览](/zh-CN/getting-started)
```
### 步骤内容
- 每步 100-300 字说明
- 包含完整的代码示例
- 解释关键代码的作用
- 使用注释标注重要部分
### 完整代码
- 汇总所有步骤的代码
- 确保可以直接复制运行
- 包含必要的 using 语句
- 添加文件结构说明
### 运行结果
- 描述预期的输出
- 如果有界面,提供截图或描述
- 说明如何验证结果正确
### 下一步
- 推荐 2-3 个后续教程
- 提供相关文档链接
- 建议进阶学习方向
## 写作风格
### 语气
- 友好、鼓励性
- 使用第二人称("你"
- 避免假设读者已有高级知识
### 步骤说明
- 使用主动语态
- 步骤标题使用动词开头
- 说明"为什么"而不仅是"怎么做"
### 代码示例
- 完整且可运行
- 包含详细注释
- 使用有意义的变量名
- 遵循项目代码风格
## 配置选项
### 教程难度
```bash
# 初学者(更多解释,简单示例)
/vitepress-tutorial "创建第一个 System" --level beginner
# 中级(平衡解释和复杂度)
/vitepress-tutorial "实现自定义命令" --level intermediate
# 高级(简洁说明,复杂示例)
/vitepress-tutorial "架构模块开发" --level advanced
```
### 步骤数量
```bash
# 指定步骤数量3-7 步)
/vitepress-tutorial "使用事件系统" --steps 5
```
## 前置条件
1. 了解教程主题的基本概念
2. 能够访问相关代码文件
3. 了解目标受众的知识水平
## 相关 Skills
- `/vitepress-api-doc` - 生成 API 参考文档
- `/vitepress-guide` - 生成功能指南
- `/vitepress-validate` - 验证生成的文档
## 最佳实践
1. **从简单开始**:第一步应该是最简单的操作
2. **逐步增加复杂度**:每步在前一步基础上增加新内容
3. **提供完整代码**:确保每步的代码都可以运行
4. **解释关键概念**:不要假设读者已经了解所有术语
5. **测试教程**:确保按照步骤操作能够得到预期结果
## 故障排除
### 问题:步骤过多,教程太长
**解决方案**:将教程拆分为多个小教程,或合并相似的步骤
### 问题:代码示例不完整
**解决方案**:在"完整代码"章节提供所有文件的完整代码
### 问题:读者反馈步骤不清晰
**解决方案**:增加更多说明,使用截图或图表辅助
## 版本历史
- v1.0.0 - 初始版本,支持分步教程生成

View File

@ -1,347 +0,0 @@
---
title: 创建第一个 Model
description: 学习如何创建和使用 Model 来管理应用数据
---
# 创建第一个 Model
## 学习目标
完成本教程后,你将能够:
- 理解 Model 在架构中的作用
- 创建自定义的 Model 类
- 在架构中注册 Model
- 从 Controller 中访问 Model
- 使用可绑定属性管理数据
## 前置条件
- 已安装 GFramework.Core NuGet 包
- 了解 C# 基础语法
- 阅读过[架构概览](/zh-CN/getting-started)
## 步骤 1创建 Model 类
首先,我们需要创建一个 Model 来存储玩家数据。Model 负责管理应用的数据和状态。
```csharp
using GFramework.Core.Abstractions.model;
using GFramework.Core.Abstractions.property;
namespace MyGame.Models
{
/// <summary>
/// 玩家数据模型
/// </summary>
public class PlayerModel : IModel
{
// 玩家名称(可绑定属性)
public BindableProperty<string> Name { get; } = new("Player");
// 玩家生命值
public BindableProperty<int> Health { get; } = new(100);
// 玩家金币
public BindableProperty<int> Gold { get; } = new(0);
// 玩家等级
public BindableProperty<int> Level { get; } = new(1);
/// <summary>
/// Model 初始化方法
/// </summary>
public void Init()
{
// 在这里可以进行初始化操作
// 例如:从配置文件加载默认值
}
}
}
```
**代码说明**
- `IModel` 接口标识这是一个数据模型
- `BindableProperty<T>` 是可绑定属性,值变化时会自动通知监听者
- `Init()` 方法在 Model 注册到架构时被调用
- 使用属性初始化器设置默认值
## 步骤 2在架构中注册 Model
创建架构类并注册 Model
```csharp
using GFramework.Core.architecture;
using MyGame.Models;
namespace MyGame
{
/// <summary>
/// 游戏架构
/// </summary>
public class GameArchitecture : Architecture
{
// 单例访问点
public static IArchitecture Interface { get; private set; }
/// <summary>
/// 初始化架构
/// </summary>
protected override void Init()
{
Interface = this;
// 注册 Model
RegisterModel(new PlayerModel());
}
}
}
```
**代码说明**
- 继承 `Architecture` 基类
- 在 `Init()` 方法中注册 Model
- 提供静态属性 `Interface` 用于全局访问架构
## 步骤 3创建 Controller 访问 Model
创建 Controller 来使用 Model
```csharp
using GFramework.Core.Abstractions.architecture;
using GFramework.Core.Abstractions.controller;
using GFramework.Core.extensions;
using MyGame.Models;
namespace MyGame.Controllers
{
/// <summary>
/// 游戏控制器
/// </summary>
public class GameController : IController
{
/// <summary>
/// 获取架构实例
/// </summary>
public IArchitecture GetArchitecture() => GameArchitecture.Interface;
/// <summary>
/// 初始化玩家数据
/// </summary>
public void InitializePlayer()
{
// 获取 PlayerModel
var playerModel = this.GetModel<PlayerModel>();
// 设置玩家数据
playerModel.Name.Value = "勇者";
playerModel.Health.Value = 100;
playerModel.Gold.Value = 50;
playerModel.Level.Value = 1;
// 监听属性变化
playerModel.Health.RegisterOnValueChanged(health =>
{
Console.WriteLine($"玩家生命值变化: {health}");
if (health <= 0)
{
Console.WriteLine("玩家死亡!");
}
});
}
/// <summary>
/// 玩家受到伤害
/// </summary>
public void TakeDamage(int damage)
{
var playerModel = this.GetModel<PlayerModel>();
playerModel.Health.Value -= damage;
}
/// <summary>
/// 玩家获得金币
/// </summary>
public void AddGold(int amount)
{
var playerModel = this.GetModel<PlayerModel>();
playerModel.Gold.Value += amount;
}
}
}
```
**代码说明**
- 实现 `IController` 接口
- 通过 `this.GetModel<T>()` 扩展方法获取 Model
- 使用 `.Value` 访问和修改属性值
- 使用 `RegisterOnValueChanged` 监听属性变化
## 步骤 4初始化并使用架构
在程序入口点初始化架构:
```csharp
using MyGame;
using MyGame.Controllers;
// 1. 创建并初始化架构
var architecture = new GameArchitecture();
architecture.Initialize();
// 2. 等待架构就绪
await architecture.WaitUntilReadyAsync();
// 3. 创建 Controller 并使用
var gameController = new GameController();
// 初始化玩家
gameController.InitializePlayer();
// 玩家受到伤害
gameController.TakeDamage(20);
// 输出: 玩家生命值变化: 80
// 玩家获得金币
gameController.AddGold(100);
```
**代码说明**
- 创建架构实例并调用 `Initialize()`
- 使用 `WaitUntilReadyAsync()` 等待架构就绪
- 创建 Controller 实例并调用方法
## 完整代码
### PlayerModel.cs
```csharp
using GFramework.Core.Abstractions.model;
using GFramework.Core.Abstractions.property;
namespace MyGame.Models
{
public class PlayerModel : IModel
{
public BindableProperty<string> Name { get; } = new("Player");
public BindableProperty<int> Health { get; } = new(100);
public BindableProperty<int> Gold { get; } = new(0);
public BindableProperty<int> Level { get; } = new(1);
public void Init() { }
}
}
```
### GameArchitecture.cs
```csharp
using GFramework.Core.architecture;
using MyGame.Models;
namespace MyGame
{
public class GameArchitecture : Architecture
{
public static IArchitecture Interface { get; private set; }
protected override void Init()
{
Interface = this;
RegisterModel(new PlayerModel());
}
}
}
```
### GameController.cs
```csharp
using GFramework.Core.Abstractions.architecture;
using GFramework.Core.Abstractions.controller;
using GFramework.Core.extensions;
using MyGame.Models;
namespace MyGame.Controllers
{
public class GameController : IController
{
public IArchitecture GetArchitecture() => GameArchitecture.Interface;
public void InitializePlayer()
{
var playerModel = this.GetModel<PlayerModel>();
playerModel.Name.Value = "勇者";
playerModel.Health.Value = 100;
playerModel.Gold.Value = 50;
playerModel.Level.Value = 1;
playerModel.Health.RegisterOnValueChanged(health =>
{
Console.WriteLine($"玩家生命值变化: {health}");
if (health <= 0)
{
Console.WriteLine("玩家死亡!");
}
});
}
public void TakeDamage(int damage)
{
var playerModel = this.GetModel<PlayerModel>();
playerModel.Health.Value -= damage;
}
public void AddGold(int amount)
{
var playerModel = this.GetModel<PlayerModel>();
playerModel.Gold.Value += amount;
}
}
}
```
### Program.cs
```csharp
using MyGame;
using MyGame.Controllers;
var architecture = new GameArchitecture();
architecture.Initialize();
await architecture.WaitUntilReadyAsync();
var gameController = new GameController();
gameController.InitializePlayer();
gameController.TakeDamage(20);
gameController.AddGold(100);
```
## 运行结果
运行程序后,你将看到以下输出:
```
玩家生命值变化: 100
玩家生命值变化: 80
```
**验证步骤**
1. 程序成功启动,没有异常
2. 控制台输出生命值变化信息
3. 玩家数据正确更新
## 下一步
恭喜!你已经学会了如何创建和使用 Model。接下来可以学习
- [创建第一个 System](/zh-CN/tutorials/create-first-system) - 学习如何创建业务逻辑层
- [使用命令系统](/zh-CN/tutorials/use-command-system) - 学习如何封装操作
- [使用事件系统](/zh-CN/tutorials/use-event-system) - 学习组件间通信
## 相关文档
- [Model 层](/zh-CN/core/model) - Model 详细说明
- [属性系统](/zh-CN/core/property) - 可绑定属性详解
- [架构组件](/zh-CN/core/architecture) - 架构基础
- [Controller 层](/zh-CN/core/controller) - Controller 详细说明

View File

@ -1,42 +0,0 @@
---
title: {{TUTORIAL_TITLE}}
description: {{TUTORIAL_DESCRIPTION}}
---
# {{TUTORIAL_TITLE}}
## 学习目标
{{LEARNING_OBJECTIVES}}
## 前置条件
{{PREREQUISITES}}
## 步骤 1{{STEP_1_TITLE}}
{{STEP_1_CONTENT}}
## 步骤 2{{STEP_2_TITLE}}
{{STEP_2_CONTENT}}
## 步骤 3{{STEP_3_TITLE}}
{{STEP_3_CONTENT}}
## 完整代码
{{FULL_CODE}}
## 运行结果
{{EXPECTED_OUTPUT}}
## 下一步
{{NEXT_STEPS}}
## 相关文档
{{RELATED_DOCS}}

View File

@ -1,297 +0,0 @@
# VitePress 文档验证
验证 VitePress 文档的质量和规范性,确保文档符合项目标准。
## 用途
此 skill 用于验证 Markdown 文档的格式和内容,包括:
- Frontmatter 格式正确性
- 内部链接有效性
- 代码块语法标记
- 标题层级结构
- 中文标点符号规范
- 泛型符号转义
## 调用方式
```bash
# 验证单个文件
/vitepress-validate <文件路径>
# 验证整个目录
/vitepress-validate <目录路径>
# 验证所有文档
/vitepress-validate docs/zh-CN/
```
**示例**
```bash
/vitepress-validate docs/zh-CN/api-reference/core/architecture.md
/vitepress-validate docs/zh-CN/core/
```
## 验证项
### 1. Frontmatter 验证
**检查项**
- YAML 语法正确性
- 必需字段存在(`title``description`
- 字段值类型正确
- `outline` 字段值有效(`deep``[2,3]` 等)
**示例**
```yaml
---
title: Architecture # 必需
description: 架构基类说明 # 必需
outline: deep # 可选,但值必须有效
---
```
### 2. 内部链接验证
**检查项**
- 相对路径链接指向的文件存在
- 绝对路径链接格式正确
- 锚点链接对应的标题存在
- 没有损坏的链接
**有效链接格式**
- `[文本](./file.md)` - 相对路径
- `[文本](/zh-CN/core/architecture)` - 绝对路径
- `[文本](#标题)` - 锚点链接
- `[文本](./file.md#标题)` - 组合链接
### 3. 代码块验证
**检查项**
- 代码块有语法标记(```csharp、```bash 等)
- C# 代码块使用 `csharp` 标记(不是 `cs``c#`
- 代码块正确闭合
- 没有未闭合的反引号
**正确格式**
```markdown
\`\`\`csharp
public class Example { }
\`\`\`
```
**错误格式**
```markdown
\`\`\`cs // 应该使用 csharp
public class Example { }
\`\`\`
```
### 4. 标题层级验证
**检查项**
- 标题层级不跳级(不能从 `#` 直接跳到 `###`
- 每个文档只有一个一级标题(`#`
- 标题层级递增合理
**正确示例**
```markdown
# 一级标题
## 二级标题
### 三级标题
## 另一个二级标题
```
**错误示例**
```markdown
# 一级标题
### 三级标题 ❌ 跳过了二级标题
```
### 5. 中文标点符号验证
**检查项**
- 中文句子使用全角标点(,。!?)
- 英文句子使用半角标点(,.!?
- 代码和技术术语周围使用半角符号
- 括号使用规范
**规范示例**
- "这是一个示例。" ✓(中文全角句号)
- "This is an example." ✓(英文半角句号)
- "`Architecture` 类提供了..." ✓(代码周围半角)
### 6. 泛型符号验证
**检查项**
- 泛型符号正确转义(`<T>``&lt;T&gt;`
- 仅在代码块外转义
- 代码块内保持原样
**正确示例**
```markdown
`List&lt;T&gt;` 是一个泛型类。
\`\`\`csharp
List<T> items = new List<T>(); // 代码块内不转义
\`\`\`
```
## 验证脚本
### validate-frontmatter.sh
验证 Frontmatter 格式。
**用法**
```bash
.claude/skills/vitepress-validate/scripts/validate-frontmatter.sh <文件路径>
```
### validate-links.sh
验证内部链接有效性。
**用法**
```bash
.claude/skills/vitepress-validate/scripts/validate-links.sh <文件路径>
```
### validate-code-blocks.sh
验证代码块语法。
**用法**
```bash
.claude/skills/vitepress-validate/scripts/validate-code-blocks.sh <文件路径>
```
### validate-all.sh
执行所有验证。
**用法**
```bash
.claude/skills/vitepress-validate/scripts/validate-all.sh <文件或目录路径>
```
## 输出格式
### 验证通过
```
✓ docs/zh-CN/core/architecture.md
- Frontmatter: 通过
- 内部链接: 通过
- 代码块: 通过
- 标题层级: 通过
- 标点符号: 通过
- 泛型符号: 通过
```
### 验证失败
```
✗ docs/zh-CN/core/architecture.md
- Frontmatter: 失败
× 缺少必需字段: description
- 内部链接: 失败
× 损坏的链接: ./missing-file.md (第 45 行)
- 代码块: 警告
⚠ 使用了 'cs' 标记,建议使用 'csharp' (第 78 行)
- 标题层级: 通过
- 标点符号: 警告
⚠ 中文句子使用了半角句号 (第 102 行)
- 泛型符号: 失败
× 未转义的泛型符号: List<T> (第 120 行)
```
## 修复建议
验证失败时skill 会提供具体的修复建议:
**示例**
```
修复建议:
1. 在 Frontmatter 中添加 description 字段
2. 修复或删除损坏的链接: ./missing-file.md
3. 将代码块标记从 'cs' 改为 'csharp'
4. 将第 102 行的半角句号改为全角句号
5. 将第 120 行的 List<T> 改为 List&lt;T&gt;
```
## 配置选项
### 严格模式
启用严格模式时,警告也会导致验证失败。
```bash
/vitepress-validate --strict docs/zh-CN/
```
### 忽略特定检查
```bash
# 忽略标点符号检查
/vitepress-validate --ignore-punctuation docs/zh-CN/
# 忽略多个检查
/vitepress-validate --ignore-punctuation --ignore-generics docs/zh-CN/
```
## 集成到工作流
### 生成后自动验证
```bash
# 1. 生成 API 文档
/vitepress-api-doc GFramework.Core/architecture/Architecture.cs
# 2. 自动验证生成的文档
/vitepress-validate docs/zh-CN/api-reference/core/architecture.md
```
### 批量验证
```bash
# 验证所有 API 文档
/vitepress-validate docs/zh-CN/api-reference/
# 验证所有文档
/vitepress-validate docs/zh-CN/
```
## 退出代码
- `0` - 所有验证通过
- `1` - 存在错误
- `2` - 仅存在警告(非严格模式下仍返回 0
## 相关 Skills
- `/vitepress-api-doc` - 生成 API 文档后自动验证
- `/vitepress-guide` - 生成指南文档后自动验证
- `/vitepress-tutorial` - 生成教程文档后自动验证
## 最佳实践
1. **生成后立即验证**:每次生成文档后立即运行验证
2. **定期批量验证**:定期验证所有文档,确保一致性
3. **修复所有错误**:不要忽略验证错误,及时修复
4. **关注警告**:警告虽不致命,但应该重视并修复
5. **使用严格模式**:在 CI/CD 中使用严格模式确保质量
## 故障排除
### 问题:误报泛型符号错误
**解决方案**:确保泛型符号在代码块外正确转义,代码块内保持原样
### 问题:中文标点符号检查过于严格
**解决方案**:使用 `--ignore-punctuation` 选项,或手动调整规则
### 问题:链接验证失败但文件确实存在
**解决方案**:检查文件路径大小写,确保路径完全匹配
## 版本历史
- v1.0.0 - 初始版本,支持 6 项基本验证

View File

@ -1,109 +0,0 @@
#!/bin/bash
# 执行所有验证
# 用法: validate-all.sh <文件或目录路径>
set -e
TARGET="$1"
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
if [ -z "$TARGET" ]; then
echo "用法: $0 <文件或目录路径>"
exit 1
fi
if [ ! -e "$TARGET" ]; then
echo "错误: 路径不存在: $TARGET"
exit 1
fi
echo "=========================================="
echo "VitePress 文档验证"
echo "=========================================="
echo ""
# 收集所有 Markdown 文件
if [ -f "$TARGET" ]; then
FILES=("$TARGET")
elif [ -d "$TARGET" ]; then
mapfile -t FILES < <(find "$TARGET" -name "*.md" -type f)
else
echo "错误: 无效的路径: $TARGET"
exit 1
fi
if [ ${#FILES[@]} -eq 0 ]; then
echo "未找到 Markdown 文件"
exit 0
fi
echo "找到 ${#FILES[@]} 个文件"
echo ""
TOTAL_ERRORS=0
TOTAL_WARNINGS=0
PASSED_FILES=0
FAILED_FILES=0
for FILE in "${FILES[@]}"; do
echo "验证: $FILE"
echo "----------------------------------------"
FILE_ERRORS=0
FILE_WARNINGS=0
# 1. Frontmatter 验证
if bash "$SCRIPT_DIR/validate-frontmatter.sh" "$FILE" 2>&1 | grep -q "✗"; then
FILE_ERRORS=$((FILE_ERRORS + 1))
fi
# 2. 链接验证
if bash "$SCRIPT_DIR/validate-links.sh" "$FILE" 2>&1 | grep -q "✗"; then
FILE_ERRORS=$((FILE_ERRORS + 1))
fi
# 3. 代码块验证
OUTPUT=$(bash "$SCRIPT_DIR/validate-code-blocks.sh" "$FILE" 2>&1 || true)
if echo "$OUTPUT" | grep -q "✗"; then
FILE_ERRORS=$((FILE_ERRORS + 1))
fi
if echo "$OUTPUT" | grep -q "⚠"; then
FILE_WARNINGS=$((FILE_WARNINGS + 1))
fi
# 统计结果
if [ $FILE_ERRORS -eq 0 ]; then
echo "✓ 验证通过"
PASSED_FILES=$((PASSED_FILES + 1))
else
echo "✗ 验证失败($FILE_ERRORS 个错误)"
FAILED_FILES=$((FAILED_FILES + 1))
fi
if [ $FILE_WARNINGS -gt 0 ]; then
echo "$FILE_WARNINGS 个警告"
fi
TOTAL_ERRORS=$((TOTAL_ERRORS + FILE_ERRORS))
TOTAL_WARNINGS=$((TOTAL_WARNINGS + FILE_WARNINGS))
echo ""
done
echo "=========================================="
echo "验证摘要"
echo "=========================================="
echo "总文件数: ${#FILES[@]}"
echo "通过: $PASSED_FILES"
echo "失败: $FAILED_FILES"
echo "总错误数: $TOTAL_ERRORS"
echo "总警告数: $TOTAL_WARNINGS"
echo ""
if [ $TOTAL_ERRORS -eq 0 ]; then
echo "✓ 所有验证通过"
exit 0
else
echo "✗ 验证失败"
exit 1
fi

View File

@ -1,64 +0,0 @@
#!/bin/bash
# 验证代码块语法
# 用法: validate-code-blocks.sh <文件路径>
set -e
FILE="$1"
if [ -z "$FILE" ]; then
echo "用法: $0 <文件路径>"
exit 1
fi
if [ ! -f "$FILE" ]; then
echo "错误: 文件不存在: $FILE"
exit 1
fi
echo "验证代码块语法: $FILE"
ERROR_COUNT=0
WARNING_COUNT=0
# 检查未闭合的代码块
OPEN_COUNT=$(grep -c '^```' "$FILE" || true)
if [ $((OPEN_COUNT % 2)) -ne 0 ]; then
echo "✗ 错误: 存在未闭合的代码块"
ERROR_COUNT=$((ERROR_COUNT + 1))
fi
# 检查 C# 代码块标记
LINE_NUM=0
while IFS= read -r LINE; do
LINE_NUM=$((LINE_NUM + 1))
# 检查是否使用了错误的 C# 标记
if echo "$LINE" | grep -qE '^```(cs|c#|C#)$'; then
echo "⚠ 警告: 第 $LINE_NUM 行使用了非标准标记,建议使用 'csharp'"
echo " 当前: $LINE"
WARNING_COUNT=$((WARNING_COUNT + 1))
fi
# 检查代码块是否有语言标记
if echo "$LINE" | grep -qE '^```$'; then
# 检查下一行是否是代码(简单启发式:不是空行且不是 ```
NEXT_LINE=$(sed -n "$((LINE_NUM + 1))p" "$FILE")
if [ -n "$NEXT_LINE" ] && ! echo "$NEXT_LINE" | grep -qE '^```'; then
echo "⚠ 警告: 第 $LINE_NUM 行的代码块缺少语言标记"
WARNING_COUNT=$((WARNING_COUNT + 1))
fi
fi
done < "$FILE"
# 输出结果
if [ $ERROR_COUNT -eq 0 ] && [ $WARNING_COUNT -eq 0 ]; then
echo "✓ 代码块验证通过"
exit 0
elif [ $ERROR_COUNT -eq 0 ]; then
echo "⚠ 代码块验证通过(有 $WARNING_COUNT 个警告)"
exit 0
else
echo "✗ 代码块验证失败($ERROR_COUNT 个错误,$WARNING_COUNT 个警告)"
exit 1
fi

View File

@ -1,57 +0,0 @@
#!/bin/bash
# 验证 Frontmatter 格式
# 用法: validate-frontmatter.sh <文件路径>
set -e
FILE="$1"
if [ -z "$FILE" ]; then
echo "用法: $0 <文件路径>"
exit 1
fi
if [ ! -f "$FILE" ]; then
echo "错误: 文件不存在: $FILE"
exit 1
fi
echo "验证 Frontmatter: $FILE"
# 检查是否有 Frontmatter限制在前几行避免匹配正文中的 '---'
if ! head -n 5 "$FILE" | grep -q "^---$"; then
echo "✗ 错误: 文件缺少 Frontmatter"
exit 1
fi
# 提取 Frontmatter 内容(第一个 --- 到第二个 --- 之间)
FRONTMATTER=$(sed -n '/^---$/,/^---$/p' "$FILE" | sed '1d;$d')
if [ -z "$FRONTMATTER" ]; then
echo "✗ 错误: Frontmatter 为空"
exit 1
fi
# 检查必需字段: title
if ! echo "$FRONTMATTER" | grep -q "^title:"; then
echo "✗ 错误: 缺少必需字段: title"
exit 1
fi
# 检查必需字段: description
if ! echo "$FRONTMATTER" | grep -q "^description:"; then
echo "✗ 错误: 缺少必需字段: description"
exit 1
fi
# 检查 outline 字段值(如果存在)
if echo "$FRONTMATTER" | grep -q "^outline:"; then
OUTLINE_VALUE=$(echo "$FRONTMATTER" | grep "^outline:" | sed 's/outline:\s*//')
if [ "$OUTLINE_VALUE" != "deep" ] && [ "$OUTLINE_VALUE" != "false" ] && ! echo "$OUTLINE_VALUE" | grep -qE '^\[.*\]$'; then
echo "⚠ 警告: outline 字段值可能无效: $OUTLINE_VALUE"
echo " 有效值: deep, false, [2,3]"
fi
fi
echo "✓ Frontmatter 验证通过"
exit 0

26
.coderabbit.yaml Normal file
View File

@ -0,0 +1,26 @@
# Copyright (c) 2025-2026 GeWuYou
# SPDX-License-Identifier: Apache-2.0
# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
language: "zh-CN"
early_access: false
reviews:
profile: "chill"
request_changes_workflow: true # 有问题时可以直接 request changes
high_level_summary: true # PR 总体总结
review_status: true # review 结果状态
review_details: true # 展示具体问题
poem: false # 关闭诗歌(基本没人用)
tools:
github-checks:
enabled: true
timeout_ms: 900000
auto_review:
enabled: true
drafts: false # draft PR 不 review
base_branches:
- refactor/cqrs-architecture-decoupling
chat:
auto_reply: true

18
.editorconfig Normal file
View File

@ -0,0 +1,18 @@
root = true
[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
[*.sln]
end_of_line = crlf
[*.bat]
end_of_line = crlf
[*.cmd]
end_of_line = crlf
[*.ps1]
end_of_line = crlf

View File

@ -1,4 +1,7 @@
license_overrides:
# Copyright (c) 2025-2026 GeWuYou
# SPDX-License-Identifier: Apache-2.0
license_overrides:
NETStandard.Library: MIT
Microsoft.NETCore.Platforms: MIT
System.Buffers: MIT

35
.gitattributes vendored Normal file
View File

@ -0,0 +1,35 @@
# Keep repository text normalized to LF unless a file format is known to require CRLF.
* text=auto eol=lf
# Solution and Windows-native scripts are more interoperable when they keep CRLF in the working tree.
*.sln text eol=crlf
*.bat text eol=crlf
*.cmd text eol=crlf
*.ps1 text eol=crlf
# Source, config, scripts, and documentation stay LF across WSL and Windows editors.
*.sh text eol=lf
*.cs text eol=lf
*.csproj text eol=lf
*.props text eol=lf
*.targets text eol=lf
*.json text eol=lf
*.yml text eol=lf
*.yaml text eol=lf
*.md text eol=lf
*.ts text eol=lf
*.js text eol=lf
*.mts text eol=lf
*.vue text eol=lf
*.css text eol=lf
# Common binary assets should never be line-normalized.
*.png binary
*.jpg binary
*.jpeg binary
*.gif binary
*.ico binary
*.zip binary
*.dll binary
*.so binary
*.pdb binary

125
.github/ISSUE_TEMPLATE/01-bug-report.yml vendored Normal file
View File

@ -0,0 +1,125 @@
# Copyright (c) 2025-2026 GeWuYou
# SPDX-License-Identifier: Apache-2.0
name: "Bug Report / 缺陷报告"
description: "Report a reproducible defect in GFramework. / 报告可稳定复现的 GFramework 缺陷。"
title: "[Bug]: "
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to report a bug.
感谢你提交缺陷报告。提交前请先搜索已有 Issue并尽量提供最小复现信息。
- type: checkboxes
id: checks
attributes:
label: "Pre-Submission Checks / 提交前检查"
description: "Please confirm the following items before submitting. / 提交前请确认以下事项。"
options:
- label: "I searched existing issues and did not find a duplicate. / 我已搜索现有 Issue未发现重复问题。"
required: true
- label: "I checked the relevant README or docs pages first. / 我已先阅读相关 README 或文档。"
required: true
- label: "I can describe a reproducible scenario or provide a minimal repro. / 我可以描述稳定复现场景或提供最小复现。"
required: true
- type: dropdown
id: module
attributes:
label: "Affected Module / 影响模块"
description: "Choose the module that best matches the problem. / 请选择最符合问题范围的模块。"
options:
- "GFramework.Core"
- "GFramework.Core.Abstractions"
- "GFramework.Game"
- "GFramework.Game.Abstractions"
- "GFramework.Godot"
- "GFramework.SourceGenerators"
- "GFramework.Godot.SourceGenerators"
- "Docs / 文档"
- "Build / CI / Packaging"
- "Unknown / Not sure / 不确定"
validations:
required: true
- type: input
id: version
attributes:
label: "Package or Commit Version / 包版本或提交版本"
description: "Example: NuGet version, commit SHA, or branch. / 例如 NuGet 版本、提交 SHA 或分支。"
placeholder: "e.g. GeWuYou.GFramework.Core 1.2.3 / main@abc1234"
validations:
required: true
- type: textarea
id: summary
attributes:
label: "Bug Summary / 问题概述"
description: "Describe the defect in one or two paragraphs. / 用 1-2 段简要描述问题。"
placeholder: "What is broken, and when does it happen? / 具体哪里出错,什么情况下出现?"
validations:
required: true
- type: textarea
id: steps
attributes:
label: "Steps To Reproduce / 复现步骤"
description: "Provide a deterministic repro whenever possible. / 尽量提供可稳定复现的步骤。"
placeholder: |
1. ...
2. ...
3. ...
validations:
required: true
- type: textarea
id: expected
attributes:
label: "Expected Behavior / 预期行为"
description: "What should happen instead? / 正常情况下应该发生什么?"
validations:
required: true
- type: textarea
id: actual
attributes:
label: "Actual Behavior / 实际行为"
description: "What actually happens? Include exception text if available. / 实际发生了什么?如有异常请附上。"
validations:
required: true
- type: textarea
id: repro
attributes:
label: "Minimal Repro / 最小复现"
description: "Share a repository, gist, code snippet, or explain why a minimal repro is not yet available. / 提供仓库、gist、代码片段或说明暂时无法提供的原因。"
placeholder: |
Please provide one of the following:
- A GitHub repository or sample project
- A gist or focused code snippet
- Or explain why a minimal repro is not yet available
请提供以下任一内容:
- GitHub 仓库或示例项目
- Gist 或聚焦代码片段
- 或说明暂时无法提供最小复现的原因
render: shell
validations:
required: true
- type: textarea
id: logs
attributes:
label: "Logs and Screenshots / 日志与截图"
description: "Paste relevant logs, stack traces, or attach screenshots. / 粘贴相关日志、堆栈,或补充截图。"
render: shell
- type: textarea
id: environment
attributes:
label: "Environment / 环境信息"
description: "List the environment details that matter for reproduction. / 请列出与复现相关的环境信息。"
placeholder: |
- OS:
- .NET SDK / Runtime:
- Godot version (if applicable):
- IDE / Build tool:
validations:
required: true
- type: textarea
id: impact
attributes:
label: "Impact and Scope / 影响范围"
description: "Explain whether this blocks adoption, breaks compatibility, or affects only a narrow scenario. / 说明该问题是否阻塞使用、破坏兼容性,还是仅影响较窄场景。"

View File

@ -0,0 +1,83 @@
# Copyright (c) 2025-2026 GeWuYou
# SPDX-License-Identifier: Apache-2.0
name: "Feature Request / 功能建议"
description: "Suggest a new capability or an API improvement. / 提出新能力或 API 改进建议。"
title: "[Feature]: "
body:
- type: markdown
attributes:
value: |
Use this form for feature proposals, API improvements, and workflow enhancements.
该模板适用于新功能、API 改进和工作流优化建议。请优先描述问题和动机,而不只是直接给出实现方案。
- type: checkboxes
id: checks
attributes:
label: "Pre-Submission Checks / 提交前检查"
description: "Please confirm the following items before submitting. / 提交前请确认以下事项。"
options:
- label: "I searched existing issues and did not find the same request. / 我已搜索现有 Issue未发现相同建议。"
required: true
- label: "I checked the relevant docs, examples, or current APIs first. / 我已先检查相关文档、示例或现有 API。"
required: true
- label: "I can explain the user problem or workflow gap this request solves. / 我可以说明该建议要解决的用户问题或工作流缺口。"
required: true
- type: dropdown
id: module
attributes:
label: "Target Module / 目标模块"
description: "Choose the module that should own this capability. / 请选择最适合承载该能力的模块。"
options:
- "GFramework.Core"
- "GFramework.Core.Abstractions"
- "GFramework.Game"
- "GFramework.Game.Abstractions"
- "GFramework.Godot"
- "GFramework.SourceGenerators"
- "GFramework.Godot.SourceGenerators"
- "Docs / 文档"
- "Build / CI / Packaging"
- "Cross-cutting / 跨模块"
- "Unknown / Not sure / 不确定"
validations:
required: true
- type: textarea
id: problem
attributes:
label: "Problem Statement / 问题背景"
description: "What problem are you facing today? / 你当前遇到的核心问题是什么?"
placeholder: "Describe the workflow pain, limitation, or missing capability. / 描述当前流程痛点、限制或缺失能力。"
validations:
required: true
- type: textarea
id: proposal
attributes:
label: "Proposed Solution / 建议方案"
description: "Describe the behavior, API shape, or user experience you want. / 描述你期望的行为、API 形态或使用体验。"
placeholder: "What should GFramework provide? / 希望 GFramework 提供什么?"
validations:
required: true
- type: textarea
id: use-cases
attributes:
label: "Use Cases / 使用场景"
description: "Show the practical scenarios this would unlock or simplify. / 说明该能力能解决或简化哪些实际场景。"
validations:
required: true
- type: textarea
id: api-sketch
attributes:
label: "API or Design Sketch / API 或设计草图"
description: "Optional but helpful: provide pseudocode, API examples, or a rough design. / 可选但强烈建议补充伪代码、API 示例或设计草图。"
render: csharp
- type: textarea
id: alternatives
attributes:
label: "Alternatives Considered / 已考虑的替代方案"
description: "Describe current workarounds or alternatives and why they are insufficient. / 描述现有替代方案或绕过方式,以及为什么不足。"
- type: textarea
id: compatibility
attributes:
label: "Compatibility and Migration Impact / 兼容性与迁移影响"
description: "State whether this needs breaking changes, opt-in behavior, or migration notes. / 说明该建议是否涉及破坏性变更、显式开关或迁移说明。"

View File

@ -0,0 +1,64 @@
# Copyright (c) 2025-2026 GeWuYou
# SPDX-License-Identifier: Apache-2.0
name: "Documentation / 文档改进"
description: "Report missing, outdated, or unclear documentation. / 报告缺失、过期或不清晰的文档。"
title: "[Docs]: "
body:
- type: markdown
attributes:
value: |
Documentation issues are product issues in this repository.
文档问题同样是产品问题。请尽量指出具体页面、段落和建议修正方向,方便快速处理。
- type: checkboxes
id: checks
attributes:
label: "Pre-Submission Checks / 提交前检查"
description: "Please confirm the following items before submitting. / 提交前请确认以下事项。"
options:
- label: "I searched existing issues and did not find the same documentation problem. / 我已搜索现有 Issue未发现相同文档问题。"
required: true
- label: "I checked the latest docs site or repository docs pages first. / 我已先检查最新文档站点或仓库文档页面。"
required: true
- type: input
id: page
attributes:
label: "Document Path or URL / 文档路径或链接"
description: "Provide the file path or docs URL if you know it. / 如果知道,请提供文档文件路径或页面链接。"
placeholder: "e.g. docs/zh-CN/core/architecture.md"
validations:
required: true
- type: dropdown
id: doc-issue-type
attributes:
label: "Issue Type / 问题类型"
description: "Choose the primary documentation problem. / 请选择主要问题类型。"
options:
- "Missing content / 缺少内容"
- "Outdated content / 内容过期"
- "Incorrect content / 内容错误"
- "Unclear explanation / 说明不清晰"
- "Missing example / 缺少示例"
- "Translation issue / 翻译问题"
validations:
required: true
- type: textarea
id: current-problem
attributes:
label: "Current Problem / 当前问题"
description: "Describe what is confusing, wrong, or missing. / 说明当前哪里令人困惑、错误或缺失。"
validations:
required: true
- type: textarea
id: expected-docs
attributes:
label: "Expected Improvement / 期望改进"
description: "Describe the improvement you expect. / 说明你期望如何改进。"
validations:
required: true
- type: textarea
id: references
attributes:
label: "Related Code or References / 相关代码或参考资料"
description: "Link related source files, PRs, issues, or external references if helpful. / 如有帮助请附上相关源码、PR、Issue 或外部参考资料。"

69
.github/ISSUE_TEMPLATE/04-question.yml vendored Normal file
View File

@ -0,0 +1,69 @@
# Copyright (c) 2025-2026 GeWuYou
# SPDX-License-Identifier: Apache-2.0
name: "Question / 使用咨询"
description: "Ask for guidance about usage, behavior, or adoption. / 询问用法、行为或接入方式。"
title: "[Question]: "
body:
- type: markdown
attributes:
value: |
Use this form when your question is specific to GFramework behavior, APIs, or adoption guidance.
如果你的问题与 GFramework 的行为、API 或接入方式直接相关,请使用此模板。一般咨询请先查看 README、贡献指南与 docs。
- type: checkboxes
id: checks
attributes:
label: "Pre-Submission Checks / 提交前检查"
description: "Please confirm the following items before submitting. / 提交前请确认以下事项。"
options:
- label: "I searched existing issues and read the relevant docs first. / 我已先搜索现有 Issue 并阅读相关文档。"
required: true
- label: "This is not a private support request or unrelated general programming question. / 这不是私有支持请求,也不是与本项目无关的泛编程问题。"
required: true
- type: dropdown
id: topic
attributes:
label: "Topic Area / 主题领域"
description: "Choose the area closest to your question. / 请选择最接近问题的主题。"
options:
- "Architecture / 架构"
- "Core APIs / Core API"
- "Game Module / Game 模块"
- "Godot Integration / Godot 集成"
- "Source Generators / 源生成器"
- "Build / Packaging / 构建与打包"
- "Docs / 文档"
- "Other / 其他"
validations:
required: true
- type: textarea
id: goal
attributes:
label: "What Are You Trying To Do? / 你想实现什么?"
description: "Explain your goal before describing the problem. / 请先说明你的目标,再描述遇到的问题。"
placeholder: "I want to... / 我想要……"
validations:
required: true
- type: textarea
id: current-attempt
attributes:
label: "Current Attempt / 当前尝试"
description: "Show what you already tried, including code, docs, or configuration. / 说明你已经尝试过什么,包括代码、文档或配置。"
render: csharp
validations:
required: true
- type: textarea
id: question
attributes:
label: "Specific Question / 具体问题"
description: "Ask the narrowest question that would unblock you. / 提出能真正帮你解阻的最小问题。"
validations:
required: true
- type: textarea
id: environment
attributes:
label: "Relevant Environment / 相关环境"
description: "Include the framework version, runtime, engine version, or project context. If not applicable, write N/A. / 请补充框架版本、运行时、引擎版本或项目上下文;如不适用请填写 N/A。"
validations:
required: true

14
.github/ISSUE_TEMPLATE/config.yml vendored Normal file
View File

@ -0,0 +1,14 @@
# Copyright (c) 2025-2026 GeWuYou
# SPDX-License-Identifier: Apache-2.0
blank_issues_enabled: false
contact_links:
- name: "Search Existing Issues / 搜索现有 Issues"
url: "https://github.com/GeWuYou/GFramework/issues?q=is%3Aissue"
about: "Check whether your topic has already been reported or discussed. / 先确认是否已有相同问题或讨论。"
- name: "Read Contribution Guide / 阅读贡献指南"
url: "https://github.com/GeWuYou/GFramework/blob/main/docs/zh-CN/contributing.md"
about: "Review issue and pull request expectations before submitting. / 提交前先阅读 Issue 与 PR 的协作约定。"
- name: "Browse Documentation / 查看文档"
url: "https://github.com/GeWuYou/GFramework/tree/main/docs/zh-CN"
about: "Read docs, tutorials, and troubleshooting pages first. / 先查看文档、教程与排障页面。"

69
.github/actions/validate-pat/action.yml vendored Normal file
View File

@ -0,0 +1,69 @@
# Copyright (c) 2025-2026 GeWuYou
# SPDX-License-Identifier: Apache-2.0
name: Validate PAT
description: Validate that the release PAT can access the repository and push tags.
inputs:
pat-token:
description: Personal access token used by semantic-release.
required: true
repo-api-url:
description: GitHub repository API URL, for example https://api.github.com/repos/owner/repo.
required: true
repository:
description: Repository slug used in error messages.
required: true
missing-token-message:
description: Error message emitted when the PAT is absent.
required: true
runs:
using: composite
steps:
- name: Validate PAT can push
shell: bash
env:
PAT_TOKEN: ${{ inputs.pat-token }}
REPO_API_URL: ${{ inputs.repo-api-url }}
REPOSITORY: ${{ inputs.repository }}
MISSING_TOKEN_MESSAGE: ${{ inputs.missing-token-message }}
run: |
if [ -z "${PAT_TOKEN}" ]; then
echo "::error::${MISSING_TOKEN_MESSAGE}"
exit 1
fi
response_file="$(mktemp)"
trap 'rm -f "${response_file}"' EXIT
status_code="$(
curl -sS -o "${response_file}" -w "%{http_code}" \
-H "Authorization: Bearer ${PAT_TOKEN}" \
-H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
"${REPO_API_URL}"
)"
case "${status_code}" in
200)
# The repository endpoint returns 200 for read-only tokens as well.
# semantic-release still performs a remote push probe, so require push permission here.
push_ok="$(jq -r '.permissions.push // false' "${response_file}")"
if [ "${push_ok}" != "true" ]; then
echo "::error::PAT_TOKEN can read ${REPOSITORY} but lacks push permission. semantic-release requires contents:write."
cat "${response_file}"
exit 1
fi
;;
401|403)
echo "::error::PAT_TOKEN is invalid or lacks access to ${REPOSITORY} (HTTP ${status_code})."
cat "${response_file}"
exit 1
;;
*)
echo "::error::Failed to validate PAT_TOKEN against ${REPO_API_URL} (HTTP ${status_code})."
cat "${response_file}"
exit 1
;;
esac

99
.github/cliff.toml vendored Normal file
View File

@ -0,0 +1,99 @@
[remote.github]
owner = "GeWuYou"
repo = "GFramework"
[changelog]
header = ""
body = """
{%- macro remote_url() -%}
https://github.com/{{ remote.github.owner }}/{{ remote.github.repo }}
{%- endmacro -%}
{% macro has_release_highlight(commit) -%}
{%- set highlighted = false -%}
{%- if commit.remote and commit.remote.pr_labels -%}
{%- for label in commit.remote.pr_labels -%}
{%- if label == "release-highlight" or label == "highlight" -%}
{%- set highlighted = true -%}
{%- endif -%}
{%- endfor -%}
{%- endif -%}
{%- if not highlighted and commit.footers -%}
{%- for footer in commit.footers -%}
{%- if footer.token == "Release-Highlight" and footer.value | trim == "true" -%}
{%- set highlighted = true -%}
{%- endif -%}
{%- endfor -%}
{%- endif -%}
{{ highlighted }}
{%- endmacro %}
{% macro print_commit(commit) -%}
- {{ commit.message | split(pat="\n") | first | trim | upper_first }}{% if commit.remote and commit.remote.username %} by @{{ commit.remote.username }}{% elif commit.author.name %} by {{ commit.author.name }}{% endif %}{% if commit.remote and commit.remote.pr_number %} in [#{{ commit.remote.pr_number }}]({{ self::remote_url() }}/pull/{{ commit.remote.pr_number }}){% endif %}
{%- endmacro %}
{% if version -%}
## {{ version }} ({{ timestamp | date(format="%Y-%m-%d") }})
{% else -%}
## 未发布
{% endif %}
{% set highlights = commits | filter(attribute="breaking", value=true) %}
{% for commit in commits -%}
{% if self::has_release_highlight(commit=commit) == "true" -%}
{% set_global highlights = highlights | concat(with=commit) -%}
{% endif -%}
{% endfor -%}
{% if highlights | length > 0 -%}
## 重点条目
{% for commit in highlights -%}
{{ self::print_commit(commit=commit) }}
{% endfor %}
{% endif -%}
{% if commits | length > 0 -%}
## What's Changed
{% for group, commits in commits | group_by(attribute="group") -%}
### {{ group | striptags | trim }}
{% for commit in commits -%}
{{ self::print_commit(commit=commit) }}
{% endfor %}
{% endfor -%}
{% endif -%}
{% if previous and previous.version and version -%}
Full Changelog: [{{ previous.version }}...{{ version }}]({{ self::remote_url() }}/compare/{{ previous.version }}...{{ version }})
{% endif -%}
"""
footer = ""
[git]
conventional_commits = true
filter_unconventional = true
split_commits = false
protect_breaking_commits = false
sort_commits = "oldest"
commit_parsers = [
{ message = ".*\\[skip changelog\\].*", skip = true },
{ body = ".*\\[skip changelog\\].*", skip = true },
{ message = "^feat", group = "<!-- 0 -->✨ 新功能" },
{ message = "^fix", group = "<!-- 1 -->🐛 Bug 修复" },
{ message = "^perf", group = "<!-- 2 -->⚡ 优化" },
{ message = "^refactor", group = "<!-- 2 -->⚡ 优化" },
{ message = "^docs", group = "<!-- 3 -->📝 文档/其他" },
{ message = "^test", group = "<!-- 3 -->📝 文档/其他" },
{ message = "^chore", group = "<!-- 3 -->📝 文档/其他" },
{ message = "^build", group = "<!-- 3 -->📝 文档/其他" },
{ message = "^ci", group = "<!-- 3 -->📝 文档/其他" },
{ message = "^style", group = "<!-- 3 -->📝 文档/其他" }
]
[git.github]
commits = true

View File

@ -1,3 +1,6 @@
# Copyright (c) 2025-2026 GeWuYou
# SPDX-License-Identifier: Apache-2.0
version: 2
updates:
# ===== NuGet 依赖(所有项目)=====

View File

@ -1,64 +1,187 @@
name: Auto Increment Version and Tag
# Copyright (c) 2025-2026 GeWuYou
# SPDX-License-Identifier: Apache-2.0
name: Semantic Release Version and Tag
on:
workflow_run:
workflows: ["CI - Build & Test"]
types:
- completed
workflow_dispatch:
concurrency:
group: auto-tag-main
group: semantic-release-main
cancel-in-progress: false
jobs:
auto-tag:
preview:
if: >
github.ref == 'refs/heads/main' &&
(
(
github.event_name == 'workflow_run' &&
github.event.workflow_run.conclusion == 'success' &&
contains(github.event.workflow_run.head_commit.message, '[release ci]')
)
||
github.event_name == 'workflow_dispatch'
)
github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
permissions:
contents: write
contents: read
pull-requests: read
outputs:
tagged: ${{ steps.create_tag.outcome == 'success' }}
published: ${{ steps.semantic_release.outputs.new_release_published }}
last_tag: ${{ steps.semantic_release.outputs.last_release_git_tag }}
next_version: ${{ steps.semantic_release.outputs.new_release_version }}
next_tag: ${{ steps.semantic_release.outputs.new_release_git_tag }}
steps:
- name: Checkout code
uses: actions/checkout@v6
with:
fetch-depth: 0
persist-credentials: false
ref: ${{ github.sha }}
- name: Get next version
id: version
run: |
LATEST_TAG=$(git tag --list "v*" --sort=-v:refname | head -n 1)
LATEST_TAG=${LATEST_TAG:-v0.0.0}
VERSION=${LATEST_TAG#v}
IFS=. read MAJOR MINOR PATCH <<< "$VERSION"
PATCH=$((PATCH+1))
echo "new_tag=v$MAJOR.$MINOR.$PATCH" >> $GITHUB_OUTPUT
# semantic-release 在 dry-run 中仍会执行一次 git push --dry-run 权限探测。
# 这里提前要求与正式 release 相同的 PAT避免 github-actions[bot] 因只读上下文触发误导性的 403。
- name: Validate PAT token
uses: ./.github/actions/validate-pat
with:
pat-token: ${{ secrets.PAT_TOKEN }}
repo-api-url: ${{ github.api_url }}/repos/${{ github.repository }}
repository: ${{ github.repository }}
missing-token-message: PAT_TOKEN is required because semantic-release preview performs a git push --dry-run permission check.
- name: Create tag
# preview 始终先运行,用于给当前 SHA 生成待发布版本预览。
- name: Semantic release preview
id: semantic_release
uses: cycjimmy/semantic-release-action@v6
with:
dry_run: true
ci: false
extra_plugins: |
conventional-changelog-conventionalcommits@9.1.0
env:
PAT: ${{ secrets.PAT_TOKEN }}
TAG: ${{ steps.version.outputs.new_tag }}
GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }}
- name: Show preview result
run: |
set -e
git config user.name "GitHub Action"
git config user.email "action@github.com"
echo "published=${{ steps.semantic_release.outputs.new_release_published }}"
echo "last_tag=${{ steps.semantic_release.outputs.last_release_git_tag }}"
echo "next_version=${{ steps.semantic_release.outputs.new_release_version }}"
echo "next_tag=${{ steps.semantic_release.outputs.new_release_git_tag }}"
if git show-ref --tags --verify --quiet "refs/tags/$TAG"; then
echo "Tag $TAG already exists, skipping"
exit 0
fi
- name: Generate preview release notes
if: ${{ steps.semantic_release.outputs.new_release_published == 'true' }}
id: cliff_preview
uses: orhun/git-cliff-action@v4
with:
config: .github/cliff.toml
args: >-
-vv --unreleased --strip header
--tag "${{ steps.semantic_release.outputs.new_release_git_tag }}"
env:
OUTPUT: PREVIEW_RELEASE_NOTES.md
GITHUB_REPO: ${{ github.repository }}
GITHUB_TOKEN: ${{ github.token }}
git tag -a "$TAG" -m "Auto tag $TAG"
git push "https://x-access-token:${PAT}@github.com/${{ github.repository }}.git" "$TAG"
- name: Write preview summary
env:
RELEASE_PUBLISHED: ${{ steps.semantic_release.outputs.new_release_published }}
CLIFF_RELEASE_NOTES: ${{ steps.cliff_preview.outputs.content }}
run: |
{
echo "## Release Preview"
echo
echo "- Commit: \`${{ github.sha }}\`"
echo "- Release needed: \`${{ steps.semantic_release.outputs.new_release_published }}\`"
echo "- Last tag: \`${{ steps.semantic_release.outputs.last_release_git_tag }}\`"
echo "- Next version: \`${{ steps.semantic_release.outputs.new_release_version }}\`"
echo "- Next tag: \`${{ steps.semantic_release.outputs.new_release_git_tag }}\`"
echo "- Preview auth: uses \`PAT_TOKEN\` because semantic-release dry-run still performs a remote push permission probe."
echo "- Snapshot semantics: this preview is pinned to dispatch SHA \`${{ github.sha }}\`; commits added to \`main\` after the run starts are not included."
if [ "${RELEASE_PUBLISHED}" = "true" ] && [ -n "${CLIFF_RELEASE_NOTES}" ]; then
echo
echo "### 候选发布说明"
echo
printf '%s\n' "${CLIFF_RELEASE_NOTES}"
fi
echo
echo "If the version looks correct, approve the \`release-approval\` environment to continue."
} >> "${GITHUB_STEP_SUMMARY}"
release:
if: >
github.ref == 'refs/heads/main' &&
needs.preview.result == 'success' &&
needs.preview.outputs.published == 'true'
needs:
- preview
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: read
environment:
name: release-approval
steps:
- name: Checkout code
uses: actions/checkout@v6
with:
fetch-depth: 0
persist-credentials: false
ref: ${{ github.sha }}
- name: Validate PAT token
uses: ./.github/actions/validate-pat
with:
pat-token: ${{ secrets.PAT_TOKEN }}
repo-api-url: ${{ github.api_url }}/repos/${{ github.repository }}
repository: ${{ github.repository }}
missing-token-message: PAT_TOKEN is required because a tag created with GITHUB_TOKEN will not trigger publish.yml.
- name: Semantic release
id: semantic_release
uses: cycjimmy/semantic-release-action@v6
with:
dry_run: false
extra_plugins: |
conventional-changelog-conventionalcommits@9.1.0
env:
GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }}
- name: Show release result
run: |
echo "published=${{ steps.semantic_release.outputs.new_release_published }}"
echo "preview_last_tag=${{ needs.preview.outputs.last_tag }}"
echo "preview_next_version=${{ needs.preview.outputs.next_version }}"
echo "preview_next_tag=${{ needs.preview.outputs.next_tag }}"
echo "last_tag=${{ steps.semantic_release.outputs.last_release_git_tag }}"
echo "next_version=${{ steps.semantic_release.outputs.new_release_version }}"
echo "next_tag=${{ steps.semantic_release.outputs.new_release_git_tag }}"
- name: Generate published release notes
if: ${{ steps.semantic_release.outputs.new_release_published == 'true' }}
id: cliff_release
uses: orhun/git-cliff-action@v4
with:
config: .github/cliff.toml
args: >-
-vv --latest --strip header
env:
OUTPUT: PUBLISHED_RELEASE_NOTES.md
GITHUB_REPO: ${{ github.repository }}
GITHUB_TOKEN: ${{ github.token }}
- name: Write release summary
env:
RELEASE_PUBLISHED: ${{ steps.semantic_release.outputs.new_release_published }}
CLIFF_RELEASE_NOTES: ${{ steps.cliff_release.outputs.content }}
run: |
{
echo "## Release Publish"
echo
echo "- Commit: \`${{ github.sha }}\`"
echo "- Preview last tag: \`${{ needs.preview.outputs.last_tag }}\`"
echo "- Preview next version: \`${{ needs.preview.outputs.next_version }}\`"
echo "- Preview next tag: \`${{ needs.preview.outputs.next_tag }}\`"
echo "- Published: \`${{ steps.semantic_release.outputs.new_release_published }}\`"
echo "- Last tag: \`${{ steps.semantic_release.outputs.last_release_git_tag }}\`"
echo "- Next version: \`${{ steps.semantic_release.outputs.new_release_version }}\`"
echo "- Next tag: \`${{ steps.semantic_release.outputs.new_release_git_tag }}\`"
echo "- Snapshot semantics: this publish run still uses dispatch SHA \`${{ github.sha }}\`; commits added to \`main\` after the preview started are excluded."
if [ "${RELEASE_PUBLISHED}" = "true" ] && [ -n "${CLIFF_RELEASE_NOTES}" ]; then
echo
echo "### 已发布说明"
echo
printf '%s\n' "${CLIFF_RELEASE_NOTES}"
fi
} >> "${GITHUB_STEP_SUMMARY}"

71
.github/workflows/benchmark.yml vendored Normal file
View File

@ -0,0 +1,71 @@
# Copyright (c) 2025-2026 GeWuYou
# SPDX-License-Identifier: Apache-2.0
name: Benchmark
on:
workflow_dispatch:
inputs:
benchmark_filter:
description: '可选的 BenchmarkDotNet 过滤器;留空时仅执行 benchmark 项目 Release build'
required: false
default: ''
type: string
permissions:
contents: read
jobs:
benchmark:
name: Benchmark Build Or Run
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Setup .NET 10
uses: actions/setup-dotnet@v5
with:
dotnet-version: 10.0.x
- name: Cache NuGet packages
uses: actions/cache@v5
with:
path: |
~/.nuget/packages
~/.local/share/NuGet
key: ${{ runner.os }}-nuget-benchmarks-${{ hashFiles('GFramework.Cqrs.Benchmarks/*.csproj', 'GFramework.Cqrs/*.csproj', 'GFramework.Cqrs.Abstractions/*.csproj', 'GFramework.Core/*.csproj', 'GFramework.Core.Abstractions/*.csproj', '**/nuget.config') }}
- name: Restore benchmark project
run: dotnet restore GFramework.Cqrs.Benchmarks/GFramework.Cqrs.Benchmarks.csproj
- name: Build benchmark project
run: dotnet build GFramework.Cqrs.Benchmarks/GFramework.Cqrs.Benchmarks.csproj -c Release --no-restore
- name: Report build-only mode
if: ${{ inputs.benchmark_filter == '' }}
run: |
echo "No benchmark filter provided."
echo "Workflow completed after validating the benchmark project build."
- name: Run filtered benchmarks
if: ${{ inputs.benchmark_filter != '' }}
env:
BENCHMARK_FILTER: ${{ inputs.benchmark_filter }}
run: |
set -euo pipefail
dotnet run --project GFramework.Cqrs.Benchmarks/GFramework.Cqrs.Benchmarks.csproj -c Release --no-build -- \
--filter "$BENCHMARK_FILTER"
- name: Upload BenchmarkDotNet artifacts
if: ${{ always() && inputs.benchmark_filter != '' }}
uses: actions/upload-artifact@v7
with:
name: benchmark-artifacts
path: |
BenchmarkDotNet.Artifacts/**
GFramework.Cqrs.Benchmarks/bin/Release/net10.0/BenchmarkDotNet.Artifacts/**
if-no-files-found: ignore

View File

@ -1,15 +1,17 @@
# Copyright (c) 2025-2026 GeWuYou
# SPDX-License-Identifier: Apache-2.0
# CI/CD工作流配置构建和测试.NET项目
# 该工作流在push到main/master分支或创建pull request时触发
# 该工作流在创建或更新面向任意分支的 pull request 时触发
name: CI - Build & Test
on:
push:
branches: [ main, master ]
pull_request:
branches: [ main, master ]
branches: [ '**' ]
permissions:
contents: read
pull-requests: write
security-events: write
jobs:
@ -29,6 +31,13 @@ jobs:
- name: Validate C# naming
run: bash scripts/validate-csharp-naming.sh
# 校验仓库维护源码是否包含 Apache-2.0 文件头声明
- name: Validate license headers
run: python3 scripts/license-header.py --check
- name: Validate runtime-generator boundaries
run: python3 scripts/validate-runtime-generator-boundaries.py
# 缓存MegaLinter
- name: Cache MegaLinter
uses: actions/cache@v5
@ -64,14 +73,14 @@ jobs:
# 使用 TruffleHog 工具扫描代码库中的敏感信息泄露如API密钥、密码等
# 该步骤会比较基础分支和当前提交之间的差异,检测新增内容中是否包含敏感数据
- name: TruffleHog OSS
uses: trufflesecurity/trufflehog@v3.94.1
uses: trufflesecurity/trufflehog@v3.95.2
with:
# 扫描路径,. 表示扫描整个仓库
path: .
# 基础提交哈希,用于与当前提交进行比较
base: ${{ github.event.before }}
base: ${{ github.event.pull_request.base.sha }}
# 当前提交哈希,作为扫描的目标版本
head: ${{ github.sha }}
head: ${{ github.event.pull_request.head.sha }}
# 构建和测试 job并行执行
build-and-test:
@ -119,46 +128,107 @@ jobs:
# 执行NuGet包恢复操作
- name: Restore
run: dotnet restore
run: dotnet restore GFramework.sln
# 恢复.NET本地工具
- name: Restore .NET tools
run: dotnet tool restore
- name: Setup Node.js 20
uses: actions/setup-node@v6
with:
node-version: 20
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: 1.2.15
- name: Install config tool dependencies
working-directory: tools/gframework-config-tool
run: bun install
- name: Run config tool tests
working-directory: tools/gframework-config-tool
run: bun run test
# 构建项目使用Release配置且跳过恢复步骤
- name: Build
run: dotnet build -c Release --no-restore
run: dotnet build GFramework.sln -c Release --no-restore
- name: Pack published modules
run: |
rm -rf ./packages
dotnet pack GFramework.sln \
-c Release \
--no-build \
--no-restore \
-o ./packages \
-p:IncludeSymbols=false
- name: Validate packed modules
run: bash scripts/validate-packed-modules.sh ./packages
# 运行单元测试输出TRX格式结果到TestResults目录
# 在同一个 step 中并发执行所有测试以加快速度
# 顺序执行各测试项目,避免并发 dotnet test 进程导致“TRX 全绿但 step 仍返回失败”的假红状态
- name: Test All Projects
id: test_all_projects
run: |
dotnet test GFramework.Core.Tests \
-c Release \
--no-build \
--logger "trx;LogFileName=core-$RANDOM.trx" \
--results-directory TestResults &
set -euo pipefail
mkdir -p TestResults
dotnet test GFramework.Game.Tests \
-c Release \
--no-build \
--logger "trx;LogFileName=game-$RANDOM.trx" \
--results-directory TestResults &
test_projects=(
"GFramework.Core.Tests/GFramework.Core.Tests.csproj:core"
"GFramework.Game.Tests/GFramework.Game.Tests.csproj:game"
"GFramework.SourceGenerators.Tests/GFramework.SourceGenerators.Tests.csproj:sg"
"GFramework.Cqrs.Tests/GFramework.Cqrs.Tests.csproj:cqrs"
"GFramework.Ecs.Arch.Tests/GFramework.Ecs.Arch.Tests.csproj:ecs-arch"
"GFramework.Godot.Tests/GFramework.Godot.Tests.csproj:godot"
"GFramework.Godot.SourceGenerators.Tests/GFramework.Godot.SourceGenerators.Tests.csproj:godot-sg"
)
dotnet test GFramework.SourceGenerators.Tests \
-c Release \
--no-build \
--logger "trx;LogFileName=sg-$RANDOM.trx" \
--results-directory TestResults &
failed=0
failed_projects=()
failed_log_paths=()
dotnet test GFramework.Ecs.Arch.Tests \
-c Release \
--no-build \
--logger "trx;LogFileName=ecs-arch-$RANDOM.trx" \
--results-directory TestResults &
for entry in "${test_projects[@]}"; do
project="${entry%%:*}"
name="${entry##*:}"
log_path="TestResults/${name}.console.log"
echo "::group::dotnet test $project"
if ! dotnet test "$project" \
-c Release \
--no-build \
--logger "trx;LogFileName=${name}.trx" \
--results-directory TestResults \
2>&1 | tee "$log_path"; then
failed=1
failed_projects+=("$project")
failed_log_paths+=("$log_path")
echo "::error title=Test project failed::$project returned a non-zero exit code."
fi
echo "::endgroup::"
done
if [ "$failed" -eq 1 ]; then
printf 'Failed test projects:\n'
printf ' %s\n' "${failed_projects[@]}"
fi
{
echo "failed=$failed"
echo "failed_projects<<EOF"
if [ "${#failed_projects[@]}" -gt 0 ]; then
printf '%s\n' "${failed_projects[@]}"
fi
echo "EOF"
echo "failed_log_paths<<EOF"
if [ "${#failed_log_paths[@]}" -gt 0 ]; then
printf '%s\n' "${failed_log_paths[@]}"
fi
echo "EOF"
} >> "$GITHUB_OUTPUT"
# 等待所有后台测试完成
wait
- name: Generate CTRF report
run: |
mkdir -p ctrf
@ -173,6 +243,20 @@ jobs:
-d ctrf \
-f "$name.json"
done
- name: Run GFramework.Godot.Tests Diagnostics
if: always() && contains(steps.test_all_projects.outputs.failed_projects, 'GFramework.Godot.Tests/GFramework.Godot.Tests.csproj')
continue-on-error: true
run: |
mkdir -p TestResults
dotnet test GFramework.Godot.Tests/GFramework.Godot.Tests.csproj \
-c Release \
--no-build \
--blame-crash \
--diag TestResults/godot-testhost-diag.log \
--logger "trx;LogFileName=godot-diagnostic.trx" \
--results-directory TestResults \
2>&1 | tee TestResults/godot-diagnostic.console.log
# 生成并发布测试报告,无论测试成功或失败都会执行
@ -188,7 +272,7 @@ jobs:
with:
report-path: './ctrf/*.json'
github-report: true
pull-request-report: true
pull-request-report: ${{ github.event.pull_request.head.repo.full_name == github.repository }}
summary-delta-report: true
insights-report: true
flaky-rate-report: true
@ -199,3 +283,22 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
if: always()
- name: Fail if any test project failed
if: always() && steps.test_all_projects.outputs.failed == '1'
env:
FAILED_PROJECTS: ${{ steps.test_all_projects.outputs.failed_projects }}
FAILED_LOG_PATHS: ${{ steps.test_all_projects.outputs.failed_log_paths }}
run: |
echo "The following test projects returned non-zero exit codes:"
printf '%s\n' "$FAILED_PROJECTS"
echo
echo "Captured dotnet test output:"
while IFS= read -r log_path; do
if [ -n "$log_path" ] && [ -f "$log_path" ]; then
echo "--- BEGIN $log_path ---"
cat "$log_path"
echo "--- END $log_path ---"
fi
done <<< "$FAILED_LOG_PATHS"
exit 1

View File

@ -1,17 +1,17 @@
# Copyright (c) 2025-2026 GeWuYou
# SPDX-License-Identifier: Apache-2.0
# GitHub Actions工作流配置CodeQL静态代码分析
# 该工作流用于对C#项目进行安全漏洞和代码质量分析
name: "CodeQL"
# 触发事件配置
# 在以下情况下触发工作流:
# 1. 推送到main分支时
# 2. 针对main分支的拉取请求时
# 3. 每天凌晨2点执行一次
# 1. 针对任意分支的拉取请求时
# 2. 每天凌晨2点执行一次
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
branches: [ '**' ]
schedule:
- cron: '0 2 * * *'

View File

@ -1,3 +1,6 @@
# Copyright (c) 2025-2026 GeWuYou
# SPDX-License-Identifier: Apache-2.0
name: License Compliance (Feluda)
on:
@ -5,6 +8,10 @@ on:
tags:
- '*'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false
permissions:
contents: write
@ -58,6 +65,7 @@ jobs:
# with: 配置上传的具体内容
# name: 工件名称,用于标识上传的文件集合
# path: 指定需要上传的文件路径列表(支持多行格式)
# third-party-licenses/**: 手工维护的参考源码许可证原文
- name: Upload compliance artifacts
uses: actions/upload-artifact@v7
with:
@ -65,6 +73,7 @@ jobs:
path: |
NOTICE
THIRD_PARTY_LICENSES.md
third-party-licenses/**
sbom.spdx.json
sbom.cyclonedx.json
sbom-spdx-validation.txt
@ -75,15 +84,17 @@ jobs:
# 压缩包中包含以下文件:
# - NOTICE: 项目声明文件
# - THIRD_PARTY_LICENSES.md: 第三方许可证列表
# - third-party-licenses/: 手工维护的参考源码许可证原文
# - sbom.spdx.json: SPDX 格式的软件物料清单
# - sbom.cyclonedx.json: CycloneDX 格式的软件物料清单
# - sbom-spdx-validation.txt: SPDX 格式验证结果
# - sbom-cyclonedx-validation.txt: CycloneDX 格式验证结果
- name: Package compliance bundle
run: |
zip license-compliance.zip \
zip -r license-compliance.zip \
NOTICE \
THIRD_PARTY_LICENSES.md \
third-party-licenses \
sbom.spdx.json \
sbom.cyclonedx.json \
sbom-spdx-validation.txt \
@ -102,7 +113,7 @@ jobs:
# env: 设置环境变量
# GITHUB_TOKEN: GitHub 访问令牌,用于授权发布操作
- name: Upload compliance assets to GitHub Release
uses: softprops/action-gh-release@v2
uses: softprops/action-gh-release@v3
with:
tag_name: ${{ github.ref_name }}
files: |
@ -114,4 +125,4 @@ jobs:
sbom-cyclonedx-validation.txt
license-compliance.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ github.token }}

View File

@ -0,0 +1,54 @@
# Copyright (c) 2025-2026 GeWuYou
# SPDX-License-Identifier: Apache-2.0
# 维护者手动触发的 Apache-2.0 文件头修复流程。
name: License Header Fix
on:
workflow_dispatch:
inputs:
base_branch:
description: Branch to fix and target with the generated pull request.
required: true
default: main
permissions:
contents: write
pull-requests: write
jobs:
fix-license-headers:
name: Create license header fix PR
runs-on: ubuntu-latest
steps:
- name: Checkout target branch
uses: actions/checkout@v6
with:
ref: ${{ inputs.base_branch }}
- name: Add missing license headers
run: python3 scripts/license-header.py --fix
- name: Create pull request
uses: peter-evans/create-pull-request@v8
with:
token: ${{ secrets.GITHUB_TOKEN }}
base: ${{ inputs.base_branch }}
branch: chore/license-headers-${{ github.run_id }}
delete-branch: true
commit-message: |
chore(license): 补齐 Apache-2.0 文件头
- 补充缺失源文件许可证声明
- 更新文件头治理校验结果
title: "chore(license): 补齐 Apache-2.0 文件头"
body: |
## Summary
- 补齐仓库维护源码和配置文件缺失的 Apache-2.0 文件头
- 使用 `scripts/license-header.py --fix` 生成本次修复
## Validation
- `python3 scripts/license-header.py --check`

View File

@ -1,3 +1,6 @@
# Copyright (c) 2025-2026 GeWuYou
# SPDX-License-Identifier: Apache-2.0
# 工作流名称Publish Docs
# 该工作流用于在推送标签或手动触发时构建并部署文档到 GitHub Pages
@ -50,6 +53,10 @@ jobs:
- name: Checkout
uses: actions/checkout@v6
# 按 GitHub Pages 官方流程初始化部署元数据。
- name: Configure GitHub Pages
uses: actions/configure-pages@v6
# 安装 Bun 运行时
- name: Setup Bun
uses: oven-sh/setup-bun@v2
@ -70,11 +77,30 @@ jobs:
- name: Make docs LLM ready
uses: demodrive-ai/llms-txt-action@v1
with:
docs_dir: docs/.vitepress/dist
docs_dir: docs/.vitepress/dist
sitemap_path: sitemap.xml
skip_llms_txt: 'false'
skip_llms_full_txt: 'false'
skip_md_files: 'false'
# 在上传前校验 LLM 索引产物,避免部署出“步骤成功但文件缺失”的 Pages 站点。
- name: Verify LLM artifacts
run: |
test -f docs/.vitepress/dist/sitemap.xml
test -f docs/.vitepress/dist/llms.txt
test -f docs/.vitepress/dist/llms-full.txt
md_count="$(find docs/.vitepress/dist -type f -name '*.md' | wc -l)"
if [ "$md_count" -eq 0 ]; then
echo "Expected llms-txt-action to generate page-level markdown files, but none were found."
exit 1
fi
echo "Generated $md_count markdown files for LLM ingestion."
# 上传构建产物作为 Pages 部署工件
- name: Upload Pages Artifact
uses: actions/upload-pages-artifact@v4
uses: actions/upload-pages-artifact@v5
with:
path: docs/.vitepress/dist

View File

@ -0,0 +1,97 @@
# Copyright (c) 2025-2026 GeWuYou
# SPDX-License-Identifier: Apache-2.0
name: Publish VS Code Extension
on:
workflow_dispatch:
inputs:
version:
description: Extension version to publish, for example 0.1.0. Leave empty to use package.json or the pushed tag.
required: false
type: string
publish_to_marketplace:
description: Publish to the Visual Studio Marketplace after packaging.
required: true
type: boolean
default: true
push:
tags:
- 'gframework-config-tool-v*'
permissions:
contents: read
jobs:
publish:
name: Package And Publish Marketplace Extension
runs-on: ubuntu-latest
defaults:
run:
working-directory: tools/gframework-config-tool
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Setup Node.js 20
uses: actions/setup-node@v6
with:
node-version: 20
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: 1.2.15
- name: Determine extension version
id: version
shell: bash
run: |
set -euo pipefail
PACKAGE_VERSION=$(node -p "require('./package.json').version")
VERSION="${PACKAGE_VERSION}"
if [[ "${GITHUB_REF:-}" == refs/tags/gframework-config-tool-v* ]]; then
VERSION="${GITHUB_REF#refs/tags/gframework-config-tool-v}"
elif [[ -n "${{ inputs.version || '' }}" ]]; then
VERSION="${{ inputs.version }}"
fi
echo "Resolved extension version: ${VERSION}"
echo "version=${VERSION}" >> "${GITHUB_OUTPUT}"
- name: Install extension dependencies
run: bun install
- name: Synchronize package.json version
shell: bash
run: |
set -euo pipefail
node -e "const fs=require('fs'); const path='package.json'; const data=JSON.parse(fs.readFileSync(path,'utf8')); data.version='${{ steps.version.outputs.version }}'; fs.writeFileSync(path, JSON.stringify(data, null, 2) + '\n');"
- name: Run extension tests
run: bun run test
- name: Package VSIX
run: |
set -euo pipefail
mkdir -p ../../artifacts
bun run package:vsix -- --out "../../artifacts/gframework-config-tool-${{ steps.version.outputs.version }}.vsix"
- name: Upload VSIX artifact
uses: actions/upload-artifact@v7
with:
name: gframework-config-tool-vsix
path: artifacts/gframework-config-tool-${{ steps.version.outputs.version }}.vsix
if-no-files-found: error
- name: Publish to Visual Studio Marketplace
if: github.event_name == 'push' || inputs.publish_to_marketplace
env:
VSCE_PAT: ${{ secrets.VSCE_PAT }}
run: bun run publish:marketplace

View File

@ -1,30 +1,40 @@
# 发布工作流NuGet + GitHub Release
#
# 功能:当推送标签时自动构建、打包并发布到 NuGet.org 和 GitHub Release
# Copyright (c) 2025-2026 GeWuYou
# SPDX-License-Identifier: Apache-2.0
# 发布工作流NuGet + GitHub Packages + GitHub Release
#
# 功能:当推送标签时自动构建、打包,并将相同产物并发发布到 NuGet.org 与 GitHub Packages
# 最后创建 GitHub Release。
# 触发条件:推送任何标签(如 v1.0.0 或 1.0.0
# 权限:允许写入内容、包和使用 OIDC 身份验证
name: Publish (NuGet + GitHub Release)
name: Publish (NuGet + GitHub Packages + GitHub Release)
# 触发:推送 tag 时触发(例如 v1.0.0 或 1.0.0
on:
push:
tags:
- '*'
# 顶级权限:允许创建 release、写 packages并允许 id-tokenOIDC
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false
permissions:
contents: write
packages: write
id-token: write
jobs:
build-and-publish:
build-pack:
name: Build And Pack
runs-on: ubuntu-latest
permissions:
contents: read
packages: read
id-token: write
contents: write
packages: write
outputs:
package_version: ${{ steps.tag_version.outputs.version }}
steps:
- name: Checkout repository (at tag)
@ -38,19 +48,17 @@ jobs:
with:
dotnet-version: 10.0.x
- name: Install unzip (for reading .nuspec from .nupkg)
run: sudo apt-get update && sudo apt-get install -y unzip
- name: Cache NuGet packages
uses: actions/cache@v5
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj') }}
- name: Restore dependencies
run: dotnet restore
# 从 GitHub 引用中提取标签版本
# 提取逻辑:去除 refs/tags/ 前缀,然后去除 v/V 前缀
# 输出version - 处理后的版本号
run: dotnet restore GFramework.sln
# 从 GitHub 引用中提取标签版本。
# 提取逻辑:去除 refs/tags/ 前缀,然后去除 v/V 前缀。
- name: Determine tag version
id: tag_version
run: |
@ -60,26 +68,58 @@ jobs:
VERSION=${TAG#v}
VERSION=${VERSION#V}
echo "tag='$TAG' -> version='$VERSION'"
echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
- name: Pack (use tag version)
run: |
set -e
echo "Packing with version=${{ steps.tag_version.outputs.version }}"
dotnet pack -c Release -o ./packages -p:PackageVersion=${{ steps.tag_version.outputs.version }} -p:IncludeSymbols=false
# 上传许可证合规相关的工件文件包括通知文件、第三方许可证、SBOM文件及验证结果
- name: Upload compliance artifacts
dotnet pack GFramework.sln \
-c Release \
--no-restore \
-o ./packages \
-p:PackageVersion=${{ steps.tag_version.outputs.version }} \
-p:IncludeSymbols=false
- name: Validate packed modules
run: bash scripts/validate-packed-modules.sh ./packages
- name: Validate runtime-generator package boundaries
run: python3 scripts/validate-runtime-generator-boundaries.py --package-dir ./packages
- name: Show packages
run: ls -la ./packages || true
# 上传 nupkg 工件,供多个发布 job 复用,避免重复打包。
- name: Upload package artifacts
uses: actions/upload-artifact@v7
with:
name: license-compliance
path: |
NOTICE
THIRD_PARTY_LICENSES.md
sbom.spdx.json
sbom.cyclonedx.json
sbom-spdx-validation.txt
sbom-cyclonedx-validation.txt
- name: Show packages
name: packages
path: ./packages/*.nupkg
publish-nuget:
name: Publish To NuGet.org
runs-on: ubuntu-latest
needs: build-pack
permissions:
contents: read
packages: read
id-token: write
steps:
- name: Setup .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: 10.0.x
- name: Download package artifacts
uses: actions/download-artifact@v8
with:
name: packages
path: ./packages
- name: Show downloaded packages
run: ls -la ./packages || true
- name: NuGet login (OIDC → temporary API key)
@ -88,9 +128,8 @@ jobs:
with:
user: ${{ secrets.NUGET_USER }}
# 将所有生成的包推送到 nuget.org
# 使用临时 API 密钥进行身份验证
# 跳过重复包的上传
# 将所有生成的包推送到 nuget.org。
# 使用临时 API 密钥进行身份验证,并跳过重复包上传。
- name: Push all packages to nuget.org
env:
NUGET_API_KEY: ${{ steps.nuget_login.outputs.NUGET_API_KEY }}
@ -110,58 +149,119 @@ jobs:
if [ "$pushed_any" = false ]; then
echo "No packages found to push."
fi
# 从 .nupkg 文件中提取版本信息
# 通过解压 .nupkgzip 格式)并读取 .nuspec 文件来获取版本
# 输出:
# package_file - 第一个找到的包文件路径
# package_basename - 包文件的基本名称
# version - 从 nuspec 中解析出的版本号
- name: Get Version and First Package Path
id: get_version
publish-github-packages:
name: Publish To GitHub Packages
runs-on: ubuntu-latest
needs: build-pack
permissions:
contents: read
packages: write
steps:
- name: Setup .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: 10.0.x
- name: Download package artifacts
uses: actions/download-artifact@v8
with:
name: packages
path: ./packages
- name: Show downloaded packages
run: ls -la ./packages || true
# 使用仓库内建的 GITHUB_TOKEN 配置 GitHub Packages NuGet 源。
- name: Configure GitHub Packages source
run: |
set -e
PACKAGE_FILE=$(find ./packages -name "*.nupkg" | head -n 1 || true)
if [ -z "$PACKAGE_FILE" ]; then
echo "No .nupkg file found in ./packages"
exit 1
fi
# 从 .nupkgzip里读取 .nuspec 并提取 <version>
VERSION=$(unzip -p "$PACKAGE_FILE" '*.nuspec' 2>/dev/null | sed -n 's:.*<version>\(.*\)</version>.*:\1:p' | head -n1)
if [ -z "$VERSION" ]; then
echo "Failed to parse version from $PACKAGE_FILE"
exit 1
fi
BASENAME=$(basename "$PACKAGE_FILE")
echo "package_file=$PACKAGE_FILE" >> $GITHUB_OUTPUT
echo "package_basename=$BASENAME" >> $GITHUB_OUTPUT
echo "version=$VERSION" >> $GITHUB_OUTPUT
dotnet nuget add source "https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json" \
--name github \
--username "${{ github.repository_owner }}" \
--password "${{ github.token }}" \
--store-password-in-clear-text
# 创建 GitHub Release
# 使用从包中提取的版本信息和当前标签创建发布
# 发布包含描述信息和版本详情
- name: Create GitHub Release and Upload Assets
uses: softprops/action-gh-release@v2
- name: Push all packages to GitHub Packages
run: |
set -e
pushed_any=false
for PKG in ./packages/*.nupkg; do
[ -f "$PKG" ] || continue
pushed_any=true
echo "Pushing $PKG to GitHub Packages..."
dotnet nuget push "$PKG" \
--source github \
--skip-duplicate
done
if [ "$pushed_any" = false ]; then
echo "No packages found to push."
fi
create-release:
name: Create GitHub Release
runs-on: ubuntu-latest
needs:
- build-pack
- publish-nuget
- publish-github-packages
if: ${{ always() && needs.build-pack.result == 'success' }}
permissions:
contents: write
packages: read
pull-requests: read
steps:
- name: Checkout repository (at tag)
uses: actions/checkout@v6
with:
generate_release_notes: true
name: "Release ${{ github.ref_name }}"
body: |
Release created by CI for tag ${{ github.ref_name }}
Package version: ${{ steps.get_version.outputs.version }}
fetch-depth: 0
persist-credentials: true
## Compliance
- NOTICE
- THIRD_PARTY_LICENSES
- SPDX & CycloneDX SBOM
- name: Download package artifacts
uses: actions/download-artifact@v8
with:
name: packages
path: ./packages
- name: Generate release notes
id: cliff_release
uses: orhun/git-cliff-action@v4
with:
config: .github/cliff.toml
args: >-
-vv --latest --strip header
env:
OUTPUT: RELEASE_NOTES.md
GITHUB_REPO: ${{ github.repository }}
GITHUB_TOKEN: ${{ github.token }}
# 无论某一侧包源发布是否失败,都继续创建 Release。
# 合规工件由独立 workflow 生成,当前发布流不再假设这些文件在同一次运行中可用。
- name: Create GitHub Release and Upload Assets
uses: softprops/action-gh-release@v3
with:
name: "Release ${{ github.ref_name }}"
body_path: RELEASE_NOTES.md
draft: false
prerelease: false
files: |
./packages/*.nupkg
NOTICE
THIRD_PARTY_LICENSES.md
sbom.spdx.json
sbom.cyclonedx.json
sbom-spdx-validation.txt
sbom-cyclonedx-validation.txt
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ github.token }}
- name: Write publish summary
env:
CLIFF_RELEASE_NOTES: ${{ steps.cliff_release.outputs.content }}
run: |
{
echo "## GitHub Release"
echo
echo "- Tag: \`${{ github.ref_name }}\`"
echo "- Package version: \`${{ needs.build-pack.outputs.package_version }}\`"
echo
printf '%s\n' "${CLIFF_RELEASE_NOTES}"
} >> "${GITHUB_STEP_SUMMARY}"

15
.gitignore vendored
View File

@ -5,6 +5,8 @@ riderModule.iml
/_ReSharper.Caches/
GFramework.sln.DotSettings.user
.idea/
dotnet-home/
scripts/__pycache__/
# ai
opencode.json
.claude/settings.local.json
@ -12,6 +14,15 @@ opencode.json
.omc/
docs/.omc/
docs/.vitepress/cache/
local-plan/
ai-plan/*
!ai-plan/README.md
!ai-plan/public/
ai-plan/public/*
!ai-plan/public/README.md
!ai-plan/public/**/
!ai-plan/public/**/*.md
ai-plan/private/
ai-libs/
.codex
# tool
.venv/
.venv/

View File

@ -1,4 +1,7 @@
# 配置文件用于设置代码质量检查工具的各项参数和规则
# Copyright (c) 2025-2026 GeWuYou
# SPDX-License-Identifier: Apache-2.0
# 配置文件用于设置代码质量检查工具的各项参数和规则
# 包含全局排除目录、启用/禁用的检查器、特定语言配置等设置
APPLY_FIXES: none
@ -45,6 +48,9 @@ ENABLE_LINTERS:
# 设置 C# 代码风格检查的参数和验证级别
# ========================
CSHARP_DOTNET_FORMAT_ARGUMENTS:
# 仓库根目录同时存在 GFramework.sln 与 GFramework.csproj
# 显式指定 workspace避免 dotnet format 在 CI 中因自动探测歧义直接异常退出。
- "GFramework.sln"
- "--severity"
- "info"
- "--verify-no-changes"
@ -83,4 +89,3 @@ GITHUB_COMMENT_REPORTER: true
PARALLEL: true
SHOW_ELAPSED_TIME: true
VALIDATE_ALL_CODEBASE: false

129
.releaserc.json Normal file
View File

@ -0,0 +1,129 @@
{
"branches": [
"main"
],
"tagFormat": "v${version}",
"plugins": [
[
"@semantic-release/commit-analyzer",
{
"preset": "conventionalcommits",
"releaseRules": [
{
"breaking": true,
"release": "major"
},
{
"revert": true,
"release": "patch"
},
{
"type": "feat",
"release": "minor"
},
{
"type": "fix",
"release": "patch"
},
{
"type": "perf",
"release": "patch"
},
{
"type": "refactor",
"release": "patch"
},
{
"type": "deps",
"release": "patch"
},
{
"type": "security",
"release": "patch"
},
{
"type": "docs",
"release": false
},
{
"type": "test",
"release": false
},
{
"type": "chore",
"release": false
},
{
"type": "build",
"release": false
},
{
"type": "ci",
"release": false
},
{
"type": "style",
"release": false
}
],
"parserOpts": {
"noteKeywords": [
"BREAKING CHANGE",
"BREAKING CHANGES"
]
}
}
],
[
"@semantic-release/release-notes-generator",
{
"preset": "conventionalcommits",
"presetConfig": {
"types": [
{
"type": "feat",
"section": "Features",
"hidden": false
},
{
"type": "fix",
"section": "Bug Fixes",
"hidden": false
},
{
"type": "perf",
"section": "Performance Improvements",
"hidden": false
},
{
"type": "refactor",
"section": "Refactoring",
"hidden": false
},
{
"type": "deps",
"section": "Dependency Updates",
"hidden": false
},
{
"type": "security",
"section": "Security Fixes",
"hidden": false
},
{
"type": "revert",
"section": "Reverts",
"hidden": false
}
]
},
"parserOpts": {
"noteKeywords": [
"BREAKING CHANGE",
"BREAKING CHANGES"
]
}
}
]
]
}

269
AGENTS.md
View File

@ -10,6 +10,126 @@ All AI agents and contributors must follow these rules when writing, reviewing,
- Use `@.ai/environment/tools.raw.yaml` only when you need the full collected facts behind the AI-facing hints.
- Prefer the project-relevant tools listed there instead of assuming every installed system tool is fair game.
- If the real environment differs from the inventory, use the project-relevant installed tool and report the mismatch.
- When working in WSL against this repository's Windows-backed worktree, first prefer Linux `git` with an explicit
`--git-dir=<repo>/.git/worktrees/<worktree-name>` and `--work-tree=<worktree-root>` binding for every repository
command. Treat that explicit binding as higher priority than `git.exe`, because it avoids WSL worktree path
translation mistakes and still works in sessions where Windows `.exe` execution is unavailable.
- If a plain Linux `git` command in WSL fails with a worktree-style “not a git repository” path translation error,
rerun it with the explicit `--git-dir` / `--work-tree` binding before trying `git.exe`.
- Only prefer Windows Git from WSL (for example `git.exe`) when that executable is both resolvable and executable in the
current session, and when the explicit Linux `git` binding is unavailable or has already failed.
- If the shell resolves `git.exe` but the current WSL session cannot execute it cleanly (for example `Exec format
error`), keep using the explicit Linux `git` binding for the rest of the task instead of retrying Windows Git.
- If the shell does not currently resolve `git.exe` to the host Windows Git installation and you still need Windows Git
as a fallback, prepend that installation's command directory to `PATH` and reset shell command hashing for the
current session before continuing.
- After resolving either strategy, prefer a session-local binding or command wrapper for subsequent Git commands so the
shell does not silently fall back to the wrong repository context later in the same WSL session.
## Git Workflow Rules
- Every completed task MUST pass at least one build validation before it is considered done.
- When the goal is to inspect or reduce warnings printed during project build, contributors MUST establish the warning
baseline from a non-incremental repository-root build by running `dotnet clean` and then `dotnet build`.
- Contributors MUST NOT treat a repeated incremental `dotnet build` result as authoritative for warning inspection when
a clean baseline has not been captured in the same round.
- If a direct `dotnet clean`, `dotnet build`, or `dotnet test` command fails inside the agent sandbox with missing
diagnostics, `Permission denied`, MSBuild pipe/socket errors, or other environment-only noise that does not match a
normal shell invocation, contributors MUST request permission and rerun the same direct command outside the sandbox
before concluding that the repository or toolchain is broken.
- For repository truth, contributors MUST prefer the result of the original direct command executed outside the sandbox
over sandbox-only failures, workaround-heavy variants, or speculative environment flags unless the user explicitly
asks for a non-default command shape.
- If the task changes multiple projects or shared abstractions, prefer a solution-level or affected-project
`dotnet build ... -c Release`; otherwise use the smallest build command that still proves the result compiles.
- When a task adds a feature or modifies code, contributors MUST run a Release build for every directly affected
module/project instead of relying on an unrelated project or solution slice that does not actually compile the touched
code.
- Warnings reported by those affected-module builds are part of the task scope. Contributors MUST resolve the touched
module's build warnings in the same change, or stop and explicitly report the exact warning IDs and blocker instead of
deferring them to a separate long-lived cleanup branch by default.
- If the required build passes and there are task-related staged or unstaged changes, contributors MUST create a Git
commit automatically instead of leaving the task uncommitted, unless the user explicitly says not to commit.
- Commit messages MUST use Conventional Commits format: `<type>(<scope>): <summary>`.
- The commit `summary` MUST use simplified Chinese and briefly describe the main change.
- The commit `body` MUST use unordered list items, and each item MUST start with a verb such as `新增``修复``优化`
`更新``补充``重构`.
- Each commit body bullet MUST describe one independent change point; avoid repeated or redundant descriptions.
- Commit `type` MUST reflect release semantics instead of author intent:
- Use `feat` only for user-facing or consumer-facing capability additions that should raise the next released version's
`minor` segment.
- Use `fix` for behavior corrections, `perf` for observable performance improvements, and `refactor` only for
non-feature code restructuring; these should raise the next released version's `patch` segment.
- Use `deps` for dependency version updates, dependency lockfile refreshes, and package maintenance that should raise
the next released version's `patch` segment.
- Use `security` for vulnerability fixes, dependency security mitigations, and security configuration corrections
that should raise the next released version's `patch` segment.
- Use `docs``test``chore``build``ci``style` for their literal categories; do not encode these changes as
`feat` just because they feel important. These categories MUST NOT trigger a release.
- Use `BREAKING CHANGE` in the commit footer or `!` after the type / scope header (for example `feat!:` or
`feat(core)!:`) when the change should raise the next released version's `major` segment.
- Documentation-only changes MUST NOT use `feat`, including new guides, refreshed examples, navigation updates, and
adoption notes for existing capabilities. If a commit changes both product behavior and related docs, either split the
commit or use `feat` only when the code/package behavior is the primary released change.
- Contributors MUST avoid ambiguous scopes such as `feat(docs)` for documentation work. If the change only affects docs,
prefer `docs(<module-or-area>)`; if it adds a real capability in a docs-related toolchain, use the scope of that
actual subsystem instead of `docs`.
- Keep technical terms in English when they are established project terms, such as `API``Model``System`.
- When composing a multi-line commit body from shell commands, contributors MUST NOT rely on Bash `$"..."` quoting for
newline escapes, because it passes literal `\n` sequences to Git. Use multiple `-m` flags or ANSI-C `$'...'`
quoting so the commit body contains real line breaks.
- If a new task starts while the current branch is `main`, contributors MUST first try to update local `main` from the
remote, then create and switch to a dedicated branch before making substantive changes.
- The branch naming rule for a new task branch is `<type>/<topic-or-scope>`, where `<type>` should match the intended
Conventional Commit category as closely as practical.
## License Header Rules
- Repository-maintained source and configuration files that are supported by `scripts/license-header.py` MUST include an
Apache-2.0 file header before the task is considered complete.
- When creating or modifying supported files, contributors MUST preserve an existing compliant header or add the SPDX
header generated by `python3 scripts/license-header.py --fix`.
- Before committing changes that add or modify supported source/configuration files, contributors MUST run
`python3 scripts/license-header.py --check` and resolve any missing or misplaced headers.
- For files with shebang lines, keep the shebang as the first line and place the license header immediately after it.
- For XML/MSBuild files with an XML declaration, keep the XML declaration as the first node and place the license header
immediately after it.
- Do not add project license headers to excluded or third-party areas such as `.agents/**`, `ai-libs/**`,
`third-party-licenses/**`, generated snapshots, binary assets, lock files, and generated build output. Treat
`scripts/license-header.py` as the authoritative include/exclude policy for this check.
- If CI reports a license-header failure, either fix it locally with `python3 scripts/license-header.py --fix` or, for
maintainer-owned cleanup, use the manual `License Header Fix` GitHub Actions workflow to create a reviewed repair PR.
## Repository Boot Skill
- The repository-maintained Codex boot skill lives at `.codex/skills/gframework-boot/`.
- Prefer invoking `$gframework-boot` when the user uses short startup prompts such as `boot``continue``next step`
`按 boot 开始``先看 AGENTS``继续当前任务`.
- The boot skill is a startup convenience layer, not a replacement for this document. If the skill and `AGENTS.md`
diverge, follow `AGENTS.md` first and update the skill in the same change.
- The boot skill MUST read `AGENTS.md``.ai/environment/tools.ai.yaml``ai-plan/public/README.md` and the relevant
active-topic `ai-plan/` artifacts before substantive execution.
## Subagent Usage Rules
- Use subagents only when the task is complex, the context is likely to grow too large, or the work can be split into
independent parallel subtasks.
- The main agent MUST identify the critical path first. Do not delegate the immediate blocking task if the next local
step depends on that result.
- Use `explorer` subagents for read-only discovery, comparison, tracing, and narrow codebase questions.
- Use `worker` subagents only for bounded implementation tasks with an explicit file or module ownership boundary.
- Every delegation MUST specify:
- the concrete objective
- the expected output format
- the files or subsystem the subagent owns
- any constraints about tests, diagnostics, or compatibility
- Subagents are not allowed to revert or overwrite unrelated changes from the user or other agents. They must adapt to
concurrent work instead of assuming exclusive ownership of the repository.
- Prefer lightweight models such as `gpt-5.1-codex-mini` for narrow exploration, indexing, and comparison tasks.
- Prefer stronger models such as `gpt-5.4` for cross-module design work, non-trivial refactors, and tasks that require
higher confidence reasoning.
- The main agent remains responsible for reviewing and integrating subagent output. Unreviewed subagent conclusions do
not count as final results.
## Commenting Rules (MUST)
@ -92,6 +212,9 @@ All generated or modified code MUST include clear and meaningful comments where
- Private fields: `_camelCase`
- Keep abstractions projects free of implementation details and engine-specific dependencies.
- Preserve existing module boundaries. Do not introduce new cross-module dependencies without clear architectural need.
- Framework runtime, abstractions, and meta-package projects MUST NOT reference `*.SourceGenerators*` projects or packages,
and MUST NOT use source-generator attributes such as `GenerateEnumExtensions` or `ContextAware`. Those capabilities are
reserved for consumer projects, generator projects, examples explicitly meant to demonstrate generator usage, and related tests.
### Formatting
@ -100,6 +223,10 @@ All generated or modified code MUST include clear and meaningful comments where
- Keep `using` directives at the top of the file and sort them consistently.
- Separate logical blocks with blank lines when it improves readability.
- Prefer one primary type per file unless the surrounding project already uses a different local pattern.
- Unless there is a clear and documented reason to keep a file large, keep a single source file under roughly 800-1000
lines.
- If a file grows beyond that range, contributors MUST stop and check whether responsibilities should be split before
continuing; treating oversized files as the default is considered a design smell.
- Keep line length readable. Around 120 characters is the preferred upper bound.
### C# Conventions
@ -114,6 +241,15 @@ All generated or modified code MUST include clear and meaningful comments where
### Analyzer and Validation Expectations
- The repository uses `Meziantou.Analyzer`; treat analyzer feedback as part of the coding standard.
- Treat SonarQube maintainability rules as part of the coding standard as well, especially cognitive complexity and
oversized parameter list findings.
- When a method approaches analyzer complexity limits, prefer extracting named helper methods by semantic phase
(parsing, normalization, validation, diagnostics) instead of silencing the warning or doing cosmetic reshuffles.
- When a constructor or method exceeds parameter count limits, choose the refactor that matches the shape of the API:
use domain-specific value objects or parameter objects for naturally grouped data, and prefer named factory methods
when the call site is really selecting between different creation modes.
- Do not add suppressions for complexity or parameter-count findings unless the constraint is externally imposed and the
reason is documented in code comments.
- Naming must remain compatible with `scripts/validate-csharp-naming.sh`.
## Testing Requirements
@ -123,6 +259,8 @@ All generated or modified code MUST include clear and meaningful comments where
- Every non-trivial feature, bug fix, or behavior change MUST include tests or an explicit justification for why a test
is not practical.
- Public API changes must be covered by unit or integration tests.
- When a public API defines multiple contract branches, tests MUST cover the meaningful variants, including null,
empty, default, and filtered inputs when those branches change behavior.
- Regression fixes should include a test that fails before the fix and passes after it.
### Test Organization
@ -143,8 +281,14 @@ All generated or modified code MUST include clear and meaningful comments where
### Validation Commands
Use the smallest command set that proves the change, then expand if the change is cross-cutting.
If a sandboxed agent run reports environment-specific .NET failures, rerun the same direct command outside the sandbox
and treat that unsandboxed result as authoritative for validation and warning baselines.
```bash
# Check warnings from the default repository build entrypoint
dotnet clean
dotnet build
# Build the full solution
dotnet build GFramework.sln -c Release
@ -193,13 +337,137 @@ bash scripts/validate-csharp-naming.sh
- If a framework abstraction changes meaning or intended usage, update the explanatory comments in code as part of the
same change.
### Documentation Source Of Truth
- Treat source code, `*.csproj`, tests, generated snapshots, and packaging metadata as the primary evidence for
documentation updates.
- Treat verified reference implementations under `ai-libs/` as a secondary evidence source for real project adoption
patterns, directory layouts, and end-to-end usage examples.
- Treat existing `README.md` files and `docs/zh-CN/` pages as editable outputs, not authoritative truth.
- If existing documentation conflicts with code or tests, update the documentation to match the implementation instead
of preserving outdated wording.
- Do not publish example code, setup steps, or package guidance that cannot be traced back to code, tests, or a
verified consumer project.
### Module README Requirements
- Every user-facing package or module directory that contains a `*.csproj` intended for direct consumption MUST have a
sibling `README.md`.
- Use the canonical filename `README.md`. Do not introduce new `ReadMe.md` or other filename variants.
- A module README MUST describe:
- the module's purpose
- the relationship to adjacent runtime, abstractions, or generator packages
- the major subdirectories or subsystems the reader is expected to use
- the minimum adoption path
- the corresponding `docs/zh-CN/` entry points
- Adding a new top-level module directory without a `README.md` is considered incomplete work.
- If a module's responsibilities, setup, public API surface, generator inputs, or adoption path change, update that
module's `README.md` in the same change.
### Repository Documentation
- Update the relevant `README.md` or `docs/` page when behavior, setup steps, architecture guidance, or user-facing
examples change.
- Public documentation under `README.md` and `docs/**` MUST stay reader-facing. Do not publish governance-only content
such as inventory tables, coverage baselines, review queues, batch metrics, recovery points, trace summaries, or
“this still needs a later audit wave” notes in those user-facing pages.
- Public documentation MUST use semantic section titles and link labels. Do not surface raw filenames or paths such as
`README.md``game/index.md``../core/cqrs.md` as reader-facing navigation text when a meaningful destination label is
available.
- Public documentation MUST avoid rhetorical, self-referential, or AI-sounding headings and prompts such as
“你真正会用到的公开入口”、
“先理解包关系”、
“这个栏目应该回答什么” or “想看……转到……”. Prefer neutral labels such as
“公开入口”、
“模块与包关系”、
“栏目覆盖范围” and “相关主题”.
- Public documentation MUST present limitations, suitability, and migration boundaries as adoption guidance for readers.
Do not publish internal-governance or product-roadmap wording such as “当前阶段的结论”、
“不建议立即启动”、
“仓库当前的主要使用者” or similar maintainer-facing decision records in `README.md` or `docs/**`; that material
belongs in `ai-plan/**` if it must be tracked.
- Governance-only material such as XML audit snapshots, documentation remediation baselines, backlog status, and
recovery metadata belongs in `ai-plan/**` or other contributor-only artifacts, not in public docs.
- Treat `ai-libs/` as a read-only third-party source reference area.
- Code under `ai-libs/**` exists for comparison, tracing, design study, and behavior verification; do not modify it
unless the user explicitly asks to sync or update that third-party snapshot.
- When implementation plans, traces, reviews, or design notes say “reference a third-party project”, prefer the
repository-local path under `ai-libs/` instead of an unspecified upstream repository.
- If a task depends on observations from `ai-libs/**`, record the referenced path and conclusion in the active plan or
trace when the work is multi-step or complex, or when an active tracking document already exists, rather than editing
the third-party reference copy.
- The main documentation site lives under `docs/`, with Chinese content under `docs/zh-CN/`.
- Keep code samples, package names, and command examples aligned with the current repository state.
- Prefer documenting behavior and design intent, not only API surface.
- When a public page references XML docs or API coverage, convert that evidence into reader-facing guidance: explain
which types, namespaces, or entry points readers should inspect and why, instead of exposing audit counts or
governance terminology.
- When a feature is added, removed, renamed, or substantially refactored, contributors MUST update or create the
corresponding user-facing integration documentation in `docs/zh-CN/` in the same change.
- For integration-oriented features such as the AI-First config system, documentation MUST cover:
- project directory layout and file conventions
- required project or package wiring
- minimal working usage example
- migration or compatibility notes when behavior changes
- If an existing documentation page no longer reflects the current implementation, fixing the code without fixing the
documentation is considered incomplete work.
- Do not rely on “the code is self-explanatory” for framework features that consumers need to adopt; write the
adoption path down so future users do not need to rediscover it from source.
- The repository root `README.md` MUST mirror the current top-level documentation taxonomy used by the docs site.
Do not maintain a second, differently named navigation system in the root README.
- Prefer linking the root `README.md` to section landing pages such as `index.md` instead of deep-linking to a single
article when the target is intended to be a documentation category.
- If a docs category appears in VitePress navigation or sidebar, it MUST have a real landing page or be removed from
navigation in the same change.
- When examples are rewritten, preserve only the parts that remain true. Delete or replace speculative examples instead
of lightly editing them into another inaccurate form.
### Task Tracking
- `ai-plan/` is split by intent:
- `ai-plan/public/README.md`: the shared startup index that binds worktrees or branches to active topics and resume
entry points
- `ai-plan/public/<topic>/todos/`: repository-safe recovery documents for an active topic
- `ai-plan/public/<topic>/traces/`: repository-safe execution traces for an active topic
- `ai-plan/public/<topic>/archive/`: archived stage-level artifacts that still belong to an active topic; prefer
`archive/todos/` and `archive/traces/` when archiving content cut out of the active entry files
- `ai-plan/public/archive/<topic>/`: completed-topic archives that should not be treated as default boot context
- `ai-plan/private/`: worktree-private recovery artifacts; keep these untracked and scoped to the current worktree
- Contributors MUST keep committed `ai-plan/public/**` content safe to publish in Git history.
- Never write secrets, tokens, credentials, private keys, machine usernames, home-directory paths, hostnames, IP
addresses, proprietary URLs, or other sensitive environment details into any `ai-plan/**` file.
- Never record absolute file-system paths in `ai-plan/**`; use repository-relative paths, branch names, PR numbers, or
stable document identifiers instead.
- Use `ai-plan/public/**` only for durable, handoff-safe task state. Put temporary notes, local experiments, or
worktree-specific scratch recovery data under `ai-plan/private/`.
- `ai-plan/public/README.md` MUST list only active topics. Do not add `ai-plan/public/archive/**` content to the
default boot index.
- When a worktree-to-topic mapping changes, or when a topic becomes active/inactive, contributors MUST update
`ai-plan/public/README.md` in the same change.
- When working from a tracked implementation plan, contributors MUST update the corresponding tracking document under
`ai-plan/public/<topic>/todos/` in the same change.
- Tracking updates MUST reflect completed work, newly discovered issues, validation results, and the next recommended
recovery point.
- Active tracking and trace files are recovery entrypoints, not append-only changelogs. They MUST stay concise enough
for `boot` to locate the current recovery point quickly.
- Completing code changes without updating the active tracking document is considered incomplete work.
- For any multi-step refactor, migration, or cross-module task, contributors MUST create or adopt a dedicated recovery
document under `ai-plan/public/<topic>/todos/` before making substantive code changes.
- Recovery documents MUST record the current phase, the active recovery point identifier, known risks, and the next
recommended resume step so another contributor or subagent can continue the work safely.
- Contributors MUST maintain a matching execution trace under `ai-plan/public/<topic>/traces/` for complex work. The
trace should record the current date, key decisions, validation milestones, and the immediate next step.
- When a stage inside an active topic is fully complete, move the finished artifacts into that topic's `archive/`
directory instead of leaving every completed step in the default boot path.
- When completed and validated stages begin to accumulate, contributors MUST archive their detailed history out of the
active `todos/` and `traces/` entry files in the same change. Keep only the current recovery point, active facts,
active risks, immediate next step, and pointers to the relevant archive files in the default boot path.
- When a topic is fully complete, move the entire topic directory under `ai-plan/public/archive/<topic>/` and remove it
from `ai-plan/public/README.md` in the same change.
- When a task spans multiple commits or is likely to exceed a single agent context window, update both the recovery
document and the trace at each meaningful milestone before pausing or handing work off.
- If subagents are used on a complex task, the main agent MUST capture the delegated scope and any accepted findings in
the active recovery document or trace before continuing implementation.
### Documentation Preview
@ -218,3 +486,4 @@ Before considering work complete, confirm:
- Relevant tests were added or updated
- Sensitive or unsafe behavior was not introduced
- User-facing documentation is updated when needed
- Feature adoption docs under `docs/zh-CN/` were added or updated when functionality was added, removed, or refactored

View File

@ -18,17 +18,22 @@ Follow them strictly.
```text
GFramework (meta package) ─→ Core + Game
GFramework.Cqrs ─→ Cqrs.Abstractions, Core.Abstractions
GFramework.Core ─→ Core.Abstractions
GFramework.Game ─→ Game.Abstractions, Core, Core.Abstractions
GFramework.Godot ─→ Core, Game, Core.Abstractions, Game.Abstractions
GFramework.Ecs.Arch ─→ Ecs.Arch.Abstractions, Core, Core.Abstractions
GFramework.SourceGenerators ─→ SourceGenerators.Common, SourceGenerators.Abstractions
GFramework.Core.SourceGenerators ─→ Core.SourceGenerators.Abstractions, SourceGenerators.Common
GFramework.Game.SourceGenerators ─→ SourceGenerators.Common
GFramework.Godot.SourceGenerators ─→ Godot.SourceGenerators.Abstractions, SourceGenerators.Common
GFramework.Cqrs.SourceGenerators ─→ SourceGenerators.Common
```
- **Abstractions projects** (`netstandard2.1`): 只包含接口和契约定义,不承载运行时实现逻辑。
- **Core / Game / Ecs.Arch** (`net8.0;net9.0;net10.0`): 平台无关的核心实现层。
- **Godot**: Godot 引擎集成层,负责与节点、场景和引擎生命周期对接。
- **SourceGenerators** (`netstandard2.1`): Roslyn 增量源码生成器及其公共基础设施。
- **SourceGenerators family** (`netstandard2.0`/`netstandard2.1`): 按 Core / Game / Godot / Cqrs 拆分的 Roslyn
增量源码生成器,以及共享的 abstractions/common 基础设施。
## Architecture Pattern
@ -73,7 +78,8 @@ Architecture 负责统一生命周期编排,核心阶段包括:
### CQRS
命令与查询分离支持同步与异步执行。Mediator 模式通过源码生成器集成,以减少模板代码并保持调用路径清晰。
命令与查询分离,支持同步与异步执行。当前版本内建自有 CQRS runtime、行为管道和 handler 自动注册;历史 `Mediator`
兼容别名已从公开 API 移除,统一使用 `Cqrs` 命名入口。
### EventBus
@ -103,6 +109,8 @@ Architecture 负责统一生命周期编排,核心阶段包括:
- `PriorityGenerator` (`[Priority]`): 生成优先级比较相关实现。
- `EnumExtensionsGenerator` (`[GenerateEnumExtensions]`): 生成枚举扩展能力。
- `ContextAwareGenerator` (`[ContextAware]`): 自动实现 `IContextAware` 相关样板逻辑。
- `CqrsHandlerRegistryGenerator`: 为消费端程序集生成 CQRS handler 注册器,运行时优先使用生成产物,无法覆盖时回退到反射扫描;非默认程序集可通过
`RegisterCqrsHandlersFromAssembly(...)` / `RegisterCqrsHandlersFromAssemblies(...)` 显式接入同一路径。
这些生成器的目标是减少重复代码,同时保持框架层 API 的一致性与可维护性。
@ -111,10 +119,12 @@ Architecture 负责统一生命周期编排,核心阶段包括:
仓库以“抽象层 + 实现层 + 集成层 + 生成器层”的方式组织:
- `GFramework.Core.Abstractions` / `GFramework.Game.Abstractions`: 约束接口和公共契约。
- `GFramework.Cqrs.Abstractions` / `GFramework.Cqrs`: 提供 CQRS 契约、runtime 与 handler 注册基础设施。
- `GFramework.Core` / `GFramework.Game`: 提供平台无关实现。
- `GFramework.Godot`: 提供与 Godot 运行时集成的适配实现。
- `GFramework.Ecs.Arch`: 提供 ECS Architecture 相关扩展。
- `GFramework.SourceGenerators` 及相关 Abstractions/Common: 提供代码生成能力。
- `GFramework.Core.SourceGenerators` / `GFramework.Game.SourceGenerators` / `GFramework.Godot.SourceGenerators` /
`GFramework.Cqrs.SourceGenerators` 与相关 Abstractions/Common: 提供代码生成能力。
这种结构的核心设计目标是让抽象稳定、实现可替换、引擎集成隔离、生成器能力可独立演进。

18
Directory.Build.props Normal file
View File

@ -0,0 +1,18 @@
<!--
Copyright (c) 2025-2026 GeWuYou
SPDX-License-Identifier: Apache-2.0
-->
<Project>
<!-- Keep repository-wide analyzer behavior consistent while allowing only selected projects to opt into polyfills. -->
<ItemGroup>
<PackageReference Include="Meziantou.Analyzer" Version="3.0.60">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<PackageReference Update="Meziantou.Polyfill" Version="1.0.121">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
</ItemGroup>
</Project>

View File

@ -1,3 +1,8 @@
<!--
Copyright (c) 2025-2026 GeWuYou
SPDX-License-Identifier: Apache-2.0
-->
<Project>
<!--

View File

@ -1,3 +1,6 @@
// Copyright (c) 2025-2026 GeWuYou
// SPDX-License-Identifier: Apache-2.0
using System.Collections.Concurrent;
namespace GFramework.Core.Abstractions.Architectures;

View File

@ -0,0 +1,27 @@
// Copyright (c) 2025-2026 GeWuYou
// SPDX-License-Identifier: Apache-2.0
using GFramework.Core.Abstractions.Enums;
namespace GFramework.Core.Abstractions.Architectures;
/// <summary>
/// 表示架构阶段变化事件的数据。
/// 该类型用于向事件订阅者传递当前已进入的阶段值。
/// </summary>
public sealed class ArchitecturePhaseChangedEventArgs : EventArgs
{
/// <summary>
/// 初始化 <see cref="ArchitecturePhaseChangedEventArgs" /> 的新实例。
/// </summary>
/// <param name="phase">当前已进入的架构阶段。</param>
public ArchitecturePhaseChangedEventArgs(ArchitecturePhase phase)
{
Phase = phase;
}
/// <summary>
/// 获取当前已进入的架构阶段。
/// </summary>
public ArchitecturePhase Phase { get; }
}

View File

@ -1,8 +1,11 @@
// Copyright (c) 2025-2026 GeWuYou
// SPDX-License-Identifier: Apache-2.0
using System.Reflection;
using GFramework.Core.Abstractions.Lifecycle;
using GFramework.Core.Abstractions.Model;
using GFramework.Core.Abstractions.Systems;
using GFramework.Core.Abstractions.Utility;
using Microsoft.Extensions.DependencyInjection;
namespace GFramework.Core.Abstractions.Architectures;
@ -73,13 +76,32 @@ public interface IArchitecture : IAsyncInitializable, IAsyncDestroyable, IInitia
void RegisterUtility<T>(Action<T>? onCreated = null) where T : class, IUtility;
/// <summary>
/// 注册中介行为管道
/// 用于配置Mediator框架的行为拦截和处理逻辑
/// 注册 CQRS 请求管道行为。
/// 既支持实现 <c>IPipelineBehavior&lt;,&gt;</c> 的开放泛型行为类型,
/// 也支持绑定到单一请求/响应对的封闭行为类型。
/// </summary>
/// <typeparam name="TBehavior">行为类型,必须是引用类型</typeparam>
void RegisterMediatorBehavior<TBehavior>()
void RegisterCqrsPipelineBehavior<TBehavior>()
where TBehavior : class;
/// <summary>
/// 从指定程序集显式注册 CQRS 处理器。
/// 当处理器位于默认架构程序集之外的模块或扩展程序集中时,可在初始化阶段调用该入口接入对应程序集。
/// </summary>
/// <param name="assembly">包含 CQRS 处理器或生成注册器的程序集。</param>
/// <exception cref="ArgumentNullException"><paramref name="assembly" /> 为 <see langword="null" />。</exception>
/// <exception cref="InvalidOperationException">当前架构的底层容器已冻结,无法继续注册处理器。</exception>
void RegisterCqrsHandlersFromAssembly(Assembly assembly);
/// <summary>
/// 从多个程序集显式注册 CQRS 处理器。
/// 该入口会对程序集集合去重,适用于统一接入多个扩展包或模块程序集。
/// </summary>
/// <param name="assemblies">要接入的程序集集合。</param>
/// <exception cref="ArgumentNullException"><paramref name="assemblies" /> 为 <see langword="null" />。</exception>
/// <exception cref="InvalidOperationException">当前架构的底层容器已冻结,无法继续注册处理器。</exception>
void RegisterCqrsHandlersFromAssemblies(IEnumerable<Assembly> assemblies);
/// <summary>
/// 安装架构模块
/// </summary>
@ -99,4 +121,4 @@ public interface IArchitecture : IAsyncInitializable, IAsyncDestroyable, IInitia
/// </summary>
/// <returns>表示异步等待操作的任务</returns>
Task WaitUntilReadyAsync();
}
}

View File

@ -1,4 +1,7 @@
using GFramework.Core.Abstractions.Properties;
// Copyright (c) 2025-2026 GeWuYou
// SPDX-License-Identifier: Apache-2.0
using GFramework.Core.Abstractions.Properties;
namespace GFramework.Core.Abstractions.Architectures;

View File

@ -1,3 +1,6 @@
// Copyright (c) 2025-2026 GeWuYou
// SPDX-License-Identifier: Apache-2.0
using GFramework.Core.Abstractions.Command;
using GFramework.Core.Abstractions.Environment;
using GFramework.Core.Abstractions.Events;
@ -5,15 +8,20 @@ using GFramework.Core.Abstractions.Model;
using GFramework.Core.Abstractions.Query;
using GFramework.Core.Abstractions.Systems;
using GFramework.Core.Abstractions.Utility;
using Mediator;
using GFramework.Cqrs.Abstractions.Cqrs;
using ICommand = GFramework.Core.Abstractions.Command.ICommand;
namespace GFramework.Core.Abstractions.Architectures;
/// <summary>
/// 架构上下文接口,提供对系统、模型、工具类的访问以及命令、查询、事件的发送和注册功能
/// 架构上下文接口,统一暴露框架组件访问、兼容旧命令/查询总线,以及当前推荐的 CQRS 运行时入口。
/// </summary>
public interface IArchitectureContext
/// <remarks>
/// <para>旧的 <c>GFramework.Core.Abstractions.Command</c> 与 <c>GFramework.Core.Abstractions.Query</c> 契约会继续通过原有 Command/Query Executor 路径执行,以保证存量代码兼容。</para>
/// <para>新的 <c>GFramework.Cqrs.Abstractions.Cqrs</c> 契约由内置 CQRS dispatcher 统一处理,支持 request pipeline、notification publish 与 stream request。</para>
/// <para>新功能优先使用 <see cref="SendRequestAsync{TResponse}(IRequest{TResponse},CancellationToken)" />、<see cref="SendAsync{TCommand}(TCommand,CancellationToken)" /> 与对应的 CQRS Command/Query 重载;迁移旧代码时可先保留旧入口,再逐步替换为 CQRS 请求模型。</para>
/// </remarks>
public interface IArchitectureContext : ICqrsContext
{
/// <summary>
/// 获取指定类型的服务实例
@ -104,87 +112,92 @@ public interface IArchitectureContext
IReadOnlyList<TUtility> GetUtilitiesByPriority<TUtility>() where TUtility : class, IUtility;
/// <summary>
/// 发送一个命令
/// 发送一个旧版命令
/// </summary>
/// <param name="command">要发送的命令</param>
/// <param name="command">要发送的旧版命令</param>
void SendCommand(ICommand command);
/// <summary>
/// 发送一个带返回值命令
/// 发送一个旧版带返回值命令
/// </summary>
/// <typeparam name="TResult">命令执行结果类型</typeparam>
/// <param name="command">要发送的命令</param>
/// <returns>命令执行结果</returns>
TResult SendCommand<TResult>(Command.ICommand<TResult> command);
/// <typeparam name="TResult">命令执行结果类型</typeparam>
/// <param name="command">要发送的旧版命令</param>
/// <returns>命令执行结果</returns>
TResult SendCommand<TResult>(ICommand<TResult> command);
/// <summary>
/// [Mediator] 发送命令的同步版本(不推荐,仅用于兼容性)
/// 发送一个新版 CQRS 命令并返回结果。
/// </summary>
/// <typeparam name="TResponse">命令响应类型</typeparam>
/// <param name="command">要发送的命令对象</param>
/// <returns>命令执行结果</returns>
TResponse SendCommand<TResponse>(Mediator.ICommand<TResponse> command);
/// <typeparam name="TResponse">命令响应类型。</typeparam>
/// <param name="command">要发送的 CQRS 命令。</param>
/// <returns>命令执行结果。</returns>
/// <remarks>
/// 这是迁移后的推荐命令入口。无返回值命令应实现 <c>IRequest&lt;Unit&gt;</c>,并优先通过 <see cref="SendAsync{TCommand}(TCommand,CancellationToken)" /> 调用。
/// </remarks>
TResponse SendCommand<TResponse>(GFramework.Cqrs.Abstractions.Cqrs.Command.ICommand<TResponse> command);
/// <summary>
/// 发送并异步执行一个命令
/// 异步发送一个旧版命令。
/// </summary>
/// <param name="command">要发送的命令</param>
/// <param name="command">要发送的旧版命令</param>
Task SendCommandAsync(IAsyncCommand command);
/// <summary>
/// [Mediator] 异步发送命令并返回结果
/// 通过Mediator模式发送命令请求支持取消操作
/// 异步发送一个新版 CQRS 命令并返回结果。
/// </summary>
/// <typeparam name="TResponse">命令响应类型</typeparam>
/// <param name="command">要发送的命令对象</param>
/// <param name="cancellationToken">取消令牌,用于取消操作</param>
/// <returns>包含命令执行结果的ValueTask</returns>
ValueTask<TResponse> SendCommandAsync<TResponse>(Mediator.ICommand<TResponse> command,
/// <typeparam name="TResponse">命令响应类型。</typeparam>
/// <param name="command">要发送的 CQRS 命令。</param>
/// <param name="cancellationToken">取消令牌。</param>
/// <returns>包含命令执行结果的值任务。</returns>
ValueTask<TResponse> SendCommandAsync<TResponse>(
GFramework.Cqrs.Abstractions.Cqrs.Command.ICommand<TResponse> command,
CancellationToken cancellationToken = default);
/// <summary>
/// 发送并异步执行一个带返回值的命令
/// 异步发送一个旧版带返回值命令。
/// </summary>
/// <typeparam name="TResult">命令执行结果类型</typeparam>
/// <param name="command">要发送的命令</param>
/// <returns>命令执行结果</returns>
/// <typeparam name="TResult">命令执行结果类型</typeparam>
/// <param name="command">要发送的旧版命令</param>
/// <returns>命令执行结果</returns>
Task<TResult> SendCommandAsync<TResult>(IAsyncCommand<TResult> command);
/// <summary>
/// 发送一个查询请求
/// 发送一个旧版查询请求
/// </summary>
/// <typeparam name="TResult">查询结果类型</typeparam>
/// <param name="query">要发送的查询</param>
/// <returns>查询结果</returns>
TResult SendQuery<TResult>(Query.IQuery<TResult> query);
/// <typeparam name="TResult">查询结果类型</typeparam>
/// <param name="query">要发送的旧版查询</param>
/// <returns>查询结果</returns>
TResult SendQuery<TResult>(IQuery<TResult> query);
/// <summary>
/// [Mediator] 发送查询的同步版本(不推荐,仅用于兼容性)
/// 发送一个新版 CQRS 查询并返回结果。
/// </summary>
/// <typeparam name="TResponse">查询响应类型</typeparam>
/// <param name="query">要发送的查询对象</param>
/// <returns>查询结果</returns>
TResponse SendQuery<TResponse>(Mediator.IQuery<TResponse> query);
/// <typeparam name="TResponse">查询响应类型。</typeparam>
/// <param name="query">要发送的 CQRS 查询。</param>
/// <returns>查询结果。</returns>
/// <remarks>
/// 这是迁移后的推荐查询入口。新查询应优先实现 <c>GFramework.Cqrs.Abstractions.Cqrs.Query.IQuery&lt;TResponse&gt;</c>。
/// </remarks>
TResponse SendQuery<TResponse>(GFramework.Cqrs.Abstractions.Cqrs.Query.IQuery<TResponse> query);
/// <summary>
/// 异步发送一个查询请求
/// 异步发送一个旧版查询请求
/// </summary>
/// <typeparam name="TResult">查询结果类型</typeparam>
/// <param name="query">要发送的异步查询</param>
/// <returns>查询结果</returns>
/// <typeparam name="TResult">查询结果类型</typeparam>
/// <param name="query">要发送的旧版异步查询</param>
/// <returns>查询结果</returns>
Task<TResult> SendQueryAsync<TResult>(IAsyncQuery<TResult> query);
/// <summary>
/// [Mediator] 异步发送查询并返回结果
/// 通过Mediator模式发送查询请求支持取消操作
/// 异步发送一个新版 CQRS 查询并返回结果。
/// </summary>
/// <typeparam name="TResponse">查询响应类型</typeparam>
/// <param name="query">要发送的查询对象</param>
/// <param name="cancellationToken">取消令牌,用于取消操作</param>
/// <returns>包含查询结果的ValueTask</returns>
ValueTask<TResponse> SendQueryAsync<TResponse>(Mediator.IQuery<TResponse> query,
/// <typeparam name="TResponse">查询响应类型</typeparam>
/// <param name="query">要发送的 CQRS 查询。</param>
/// <param name="cancellationToken">取消令牌</param>
/// <returns>包含查询结果的值任务。</returns>
ValueTask<TResponse> SendQueryAsync<TResponse>(GFramework.Cqrs.Abstractions.Cqrs.Query.IQuery<TResponse> query,
CancellationToken cancellationToken = default);
/// <summary>
@ -216,28 +229,40 @@ public interface IArchitectureContext
void UnRegisterEvent<TEvent>(Action<TEvent> onEvent);
/// <summary>
/// 发送请求(统一处理 Command/Query
/// 发送新版 CQRS 请求,并统一处理命令与查询。
/// </summary>
/// <remarks>
/// 这是自有 CQRS 运行时的主入口。新代码应优先通过该方法或 <see cref="SendAsync{TCommand}(TCommand,CancellationToken)" /> 进入 dispatcher。
/// </remarks>
ValueTask<TResponse> SendRequestAsync<TResponse>(
IRequest<TResponse> request,
CancellationToken cancellationToken = default);
/// <summary>
/// 发送请求(同步版本,不推荐)
/// 发送新版 CQRS 请求的同步包装版本。
/// </summary>
/// <remarks>
/// 仅为兼容同步调用链保留;新代码应优先使用异步入口,避免阻塞当前线程。
/// </remarks>
TResponse SendRequest<TResponse>(IRequest<TResponse> request);
/// <summary>
/// 发布通知(一对多事件)
/// 发布新版 CQRS 通知。
/// </summary>
/// <remarks>
/// 该入口用于一对多通知分发,与框架级 <c>EventBus</c> 事件系统并存,适合围绕请求处理过程传播领域通知。
/// </remarks>
ValueTask PublishAsync<TNotification>(
TNotification notification,
CancellationToken cancellationToken = default)
where TNotification : INotification;
/// <summary>
/// 创建流式请求(用于大数据集)
/// 创建新版 CQRS 流式请求。
/// </summary>
/// <remarks>
/// 适用于需要按序惰性产出大量结果的场景。调用方应消费返回的异步序列,而不是回退到旧版查询总线。
/// </remarks>
IAsyncEnumerable<TResponse> CreateStream<TResponse>(
IStreamRequest<TResponse> request,
CancellationToken cancellationToken = default);
@ -245,7 +270,7 @@ public interface IArchitectureContext
// === 便捷扩展方法 ===
/// <summary>
/// 发送命令(无返回值)
/// 发送一个无返回值的新版 CQRS 命令。
/// </summary>
ValueTask SendAsync<TCommand>(
TCommand command,
@ -253,7 +278,7 @@ public interface IArchitectureContext
where TCommand : IRequest<Unit>;
/// <summary>
/// 发送命令(有返回值)
/// 发送一个有返回值的新版 CQRS 请求。
/// </summary>
ValueTask<TResponse> SendAsync<TResponse>(
IRequest<TResponse> command,
@ -265,4 +290,4 @@ public interface IArchitectureContext
/// </summary>
/// <returns>环境对象实例</returns>
IEnvironment GetEnvironment();
}
}

View File

@ -1,3 +1,6 @@
// Copyright (c) 2025-2026 GeWuYou
// SPDX-License-Identifier: Apache-2.0
namespace GFramework.Core.Abstractions.Architectures;
/// <summary>

View File

@ -1,4 +1,7 @@
using GFramework.Core.Abstractions.Enums;
// Copyright (c) 2025-2026 GeWuYou
// SPDX-License-Identifier: Apache-2.0
using GFramework.Core.Abstractions.Enums;
namespace GFramework.Core.Abstractions.Architectures;

View File

@ -1,4 +1,7 @@
namespace GFramework.Core.Abstractions.Architectures;
// Copyright (c) 2025-2026 GeWuYou
// SPDX-License-Identifier: Apache-2.0
namespace GFramework.Core.Abstractions.Architectures;
/// <summary>
/// 架构模块接口,继承自架构生命周期接口。

View File

@ -1,4 +1,7 @@
using GFramework.Core.Abstractions.Enums;
// Copyright (c) 2025-2026 GeWuYou
// SPDX-License-Identifier: Apache-2.0
using GFramework.Core.Abstractions.Enums;
namespace GFramework.Core.Abstractions.Architectures;

View File

@ -1,3 +1,6 @@
// Copyright (c) 2025-2026 GeWuYou
// SPDX-License-Identifier: Apache-2.0
using GFramework.Core.Abstractions.Command;
using GFramework.Core.Abstractions.Events;
using GFramework.Core.Abstractions.Ioc;

View File

@ -1,3 +1,6 @@
// Copyright (c) 2025-2026 GeWuYou
// SPDX-License-Identifier: Apache-2.0
using GFramework.Core.Abstractions.Ioc;
using GFramework.Core.Abstractions.Lifecycle;

View File

@ -1,3 +1,6 @@
// Copyright (c) 2025-2026 GeWuYou
// SPDX-License-Identifier: Apache-2.0
using GFramework.Core.Abstractions.Ioc;
namespace GFramework.Core.Abstractions.Architectures;

View File

@ -1,4 +1,7 @@
namespace GFramework.Core.Abstractions.Bases;
// Copyright (c) 2025-2026 GeWuYou
// SPDX-License-Identifier: Apache-2.0
namespace GFramework.Core.Abstractions.Bases;
/// <summary>
/// 表示键值对的接口,定义了通用的键值对数据结构契约

View File

@ -1,3 +1,6 @@
// Copyright (c) 2025-2026 GeWuYou
// SPDX-License-Identifier: Apache-2.0
namespace GFramework.Core.Abstractions.Bases;
/// <summary>

View File

@ -1,3 +1,6 @@
// Copyright (c) 2025-2026 GeWuYou
// SPDX-License-Identifier: Apache-2.0
namespace GFramework.Core.Abstractions.Bases;
/// <summary>

View File

@ -1,3 +1,6 @@
// Copyright (c) 2025-2026 GeWuYou
// SPDX-License-Identifier: Apache-2.0
using GFramework.Core.Abstractions.Rule;
namespace GFramework.Core.Abstractions.Command;

Some files were not shown because too many files have changed in this diff Show More