self-improve
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseSelf-improve skill
Self-improve 技能
Activated by when is set. Runs after all specialist work and
the review loop have completed.
blazor-architect--self-improve当设置 参数时,由 激活。在所有专项工作和审核循环完成后运行。
--self-improveblazor-architectStep 1 — Create the run directory
步骤1 — 创建运行目录
Create if it does not exist.
~/.self-improve-reports/blazor-architect/runs/<run_id>/Done when: the run directory exists on disk.
如果 目录不存在,则创建该目录。
~/.self-improve-reports/blazor-architect/runs/<run_id>/完成标志: 运行目录已在磁盘上存在。
Step 2 — Generate the improvement report
步骤2 — 生成改进报告
Consult for the complete algorithm. The ordered steps:
references/self-improve-generation.md- Collect all entries from specialist reports in the run.
self_diagnosis.issues - Map each to a raw finding (title, summary, category, severity, expected_impact, prompt_fragment, evidence).
- Derive for each finding (
suggestion_key).<category>:<target_surface>:<normalized_intent> - Load if present.
~/.self-improve-reports/blazor-architect/suggestion-history.json - Hard-exclude findings with history entries.
never_again - Group by , fold using merge rules (max severity, evidence union, recurrence count).
suggestion_key - Apply from most recent decision per key.
history_weight - Compute (base_severity_weight + recurrence_boost + history_weight).
ranking_score - Sort by severity group, then ranking_score descending, then first_seen ascending.
- Assign sequential ids (f-001, f-002, ...).
- Build the origin block from current run context.
- Write to the run directory.
improvement-report-data.json
The file must conform to (schema version 1.1).
A valid example is at .
references/improvement-report-data-schema.jsonreferences/improvement-report-data-example.jsonInitial file shape:
json
{
"schema_version": "1.1",
"generated_at": "<ISO timestamp>",
"origin": {
"skill_id": "<active skill id>",
"skill_scope": "repo | user",
"skill_path": "<absolute path to skill directory>",
"repo_root": "<absolute git repository root>",
"run_id": "<run_id>"
},
"findings": [ ... ],
"decisions": {},
"shipped_prompt": null
}decisionsshipped_promptDone when: is written to the run directory with valid findings
(or an empty findings array if no self-diagnosis issues were collected).
improvement-report-data.json完整算法请参考 。有序步骤如下:
references/self-improve-generation.md- 收集本次运行中所有专项报告里的 条目。
self_diagnosis.issues - 将每个条目映射为原始发现项(包含标题、摘要、分类、严重程度、预期影响、提示片段、证据)。
- 为每个发现项生成 (格式为
suggestion_key)。<category>:<target_surface>:<normalized_intent> - 如果存在 文件,则加载该文件。
~/.self-improve-reports/blazor-architect/suggestion-history.json - 硬排除包含 历史记录的发现项。
never_again - 按 分组,使用合并规则合并(取最高严重程度、合并证据、统计重复次数)。
suggestion_key - 应用每个键对应最近决策的 。
history_weight - 计算 (基础严重程度权重 + 重复次数增益 + 历史权重)。
ranking_score - 先按严重程度分组排序,再按 降序排序,最后按首次出现时间升序排序。
ranking_score - 分配连续ID(f-001、f-002……)。
- 根据当前运行上下文构建来源块。
- 将 写入运行目录。
improvement-report-data.json
该文件必须符合 (schema版本1.1)。有效示例可查看 。
references/improvement-report-data-schema.jsonreferences/improvement-report-data-example.json初始文件结构:
json
{
"schema_version": "1.1",
"generated_at": "<ISO timestamp>",
"origin": {
"skill_id": "<active skill id>",
"skill_scope": "repo | user",
"skill_path": "<absolute path to skill directory>",
"repo_root": "<absolute git repository root>",
"run_id": "<run_id>"
},
"findings": [ ... ],
"decisions": {},
"shipped_prompt": null
}decisionsshipped_prompt完成标志: 已写入运行目录,且包含有效发现项(如果未收集到任何自我诊断问题,则为空发现项数组)。
improvement-report-data.jsonStep 3 — Launch the report-server
步骤3 — 启动报告服务器
The report-server binary lives at (Windows) or
(Linux/macOS). Launch it with the report file path:
~/.copilot/gman-skills/bin/report-server.exe~/.copilot/gman-skills/bin/report-serverWindows:
~/.copilot/gman-skills/bin/report-server.exe --report-path ~/.self-improve-reports/blazor-architect/runs/<run_id>/improvement-report-data.jsonLinux / macOS:
~/.copilot/gman-skills/bin/report-server --report-path ~/.self-improve-reports/blazor-architect/runs/<run_id>/improvement-report-data.jsonThe server listens on by default. If the port is already bound, assume the server
is already running — log a warning and continue (do not launch a second instance).
127.0.0.1:5173After launching, open the browser to so the user can see the report.
Announce the URL clearly:
http://127.0.0.1:5173[blazor-architect] Self-improvement report ready at http://127.0.0.1:5173
report file: ~/.self-improve-reports/blazor-architect/runs/<run_id>/improvement-report-data.json
server PID: <pid>The server stays alive until is called, an idle timeout elapses after the browser
connects, or the terminal session ends. API surface: , ,
, , .
GET /shutdownGET /api/reportGET /pingPOST /api/ship-promptPOST /api/dismissalsGET /shutdownIf the binary is missing, print a warning telling the user to run and continue
without the server — the report file is still useful on its own.
/setup-gman-skillsDone when: the server is running and responding on port 5173, or the binary is missing and a
warning has been printed.
报告服务器二进制文件位于 (Windows系统)或 (Linux/macOS系统)。使用报告文件路径启动服务器:
~/.copilot/gman-skills/bin/report-server.exe~/.copilot/gman-skills/bin/report-serverWindows系统:
~/.copilot/gman-skills/bin/report-server.exe --report-path ~/.self-improve-reports/blazor-architect/runs/<run_id>/improvement-report-data.jsonLinux / macOS系统:
~/.copilot/gman-skills/bin/report-server --report-path ~/.self-improve-reports/blazor-architect/runs/<run_id>/improvement-report-data.json服务器默认监听 。如果该端口已被占用,则假定服务器已在运行——记录警告并继续(不要启动第二个实例)。
127.0.0.1:5173启动后,打开浏览器访问 ,以便用户查看报告。清晰告知URL:
http://127.0.0.1:5173[blazor-architect] 自我改进报告已就绪,访问地址:http://127.0.0.1:5173
报告文件:~/.self-improve-reports/blazor-architect/runs/<run_id>/improvement-report-data.json
服务器PID:<pid>服务器会保持运行,直到调用 、浏览器连接后触发空闲超时,或终端会话结束。API接口包括:、、、、。
GET /shutdownGET /api/reportGET /pingPOST /api/ship-promptPOST /api/dismissalsGET /shutdown如果二进制文件缺失,打印警告告知用户运行 ,然后不启动服务器继续执行——报告文件本身仍有使用价值。
/setup-gman-skills完成标志: 服务器已在5173端口运行并响应,或二进制文件缺失且已打印警告。
Step 4 — Staging readiness (after server session ends)
步骤4 — 暂存就绪检查(服务器会话结束后)
After the server shuts down (user calls , idle timeout, or terminal end), check the
report file for staging readiness:
GET /shutdown- Ready when is non-empty OR
decisionsis non-null.shipped_prompt - When ready, stage:
git add ~/.self-improve-reports/blazor-architect/runs/<run_id>/improvement-report-data.json
If the file is already git-tracked and has local modifications, present the conflict flow
(continue / stash / discard) from . Default
to "Continue" after 30 seconds of no response.
references/self-improve-generation.md § Conflict flowDone when: staging is complete or the file is not ready to stage.
服务器关闭后(用户调用 、触发空闲超时,或终端结束),检查报告文件是否具备暂存条件:
GET /shutdown- 就绪条件:非空 或
decisions非Null。shipped_prompt - 就绪时,执行暂存:
git add ~/.self-improve-reports/blazor-architect/runs/<run_id>/improvement-report-data.json
如果文件已被Git追踪且存在本地修改,执行 中的冲突处理流程(继续/暂存/丢弃)。如果30秒内无响应,默认选择“继续”。
references/self-improve-generation.md § Conflict flow完成标志: 暂存已完成,或文件暂未达到就绪条件。
Suggestion history
建议历史记录
The cross-run suggestion history store lives at
. It records user decisions
(, , ) per across runs. It is never committed
to source control. See for the schema.
~/.self-improve-reports/blazor-architect/suggestion-history.jsonaccepteddismissednever_againsuggestion_keyreferences/suggestion-history-schema.json跨运行的建议历史记录存储在 。它记录了不同运行中每个 对应的用户决策(、、)。该文件不会提交到源代码控制。schema详情请查看 。
~/.self-improve-reports/blazor-architect/suggestion-history.jsonsuggestion_keyaccepteddismissednever_againreferences/suggestion-history-schema.json