blazor-architect

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Blazor architect skill

Blazor架构师技能

Step 1 — Announce the run

步骤1 — 启动运行

Generate a run ID (
run-YYYYMMDD-HHMM
, local time) and print it as the first output line:
[blazor-architect] run-20260802-1716 started
Done when: the run ID line is printed at the top of your response.
生成一个运行ID(格式为
run-YYYYMMDD-HHMM
,使用本地时间),并将其作为第一行输出:
[blazor-architect] run-20260802-1716 started
完成标志: 运行ID行显示在响应内容的最顶部。

Step 2 — Parse the work request and flags from the invocation text

步骤2 — 从调用文本中解析工作请求和标志

The user's task description is embedded in the invocation text — the same line they typed to fire the skill (e.g.
/blazor-architect implement a counter component in Components/Pages/Counter.razor --self-improve
). Extract two things:
The work request — the task description, stripped of the skill name and flags. In the example above, the work request is: "implement a counter component in Components/Pages/Counter.razor".
Flags — scanned from the invocation text:
FlagRecognisedDefault
Skip code review
--skip-code-review
or "skip code review"
off (review runs)
Self-improvement
--self-improve
or "self improve"
off
If no work request is found (the user typed just
/blazor-architect
with no task), ask what they want to do and stop — do not proceed to routing.
Done when: you have identified the work request text and set
skip_code_review
and
self_improve
booleans.
用户的任务描述嵌入在调用文本中——即用户触发此技能时输入的内容(例如
/blazor-architect implement a counter component in Components/Pages/Counter.razor --self-improve
)。需要提取两项内容:
工作请求 —— 去除技能名称和标志后的任务描述。在上述示例中,工作请求为:"implement a counter component in Components/Pages/Counter.razor"。
标志 —— 从调用文本中扫描得到:
标志识别形式默认值
跳过代码评审
--skip-code-review
或 "skip code review"
关闭(执行评审)
自我优化
--self-improve
或 "self improve"
关闭
如果未找到工作请求(用户仅输入
/blazor-architect
而未指定任务),询问用户需求并终止流程——不要继续进行路由操作。
完成标志: 已识别工作请求文本,并设置
skip_code_review
self_improve
布尔值。

Step 3 — Route the work

步骤3 — 路由工作请求

Apply the route classifier in
references/routing-classifier.md
to the work request. The classifier picks a primary lane and decides inline vs delegate. Print a one-line routing summary so the user sees the decision:
Route: inline (component-author, 1 file)
or
Route: delegate (component-author → data-fetching-specialist, serial)
Done when: a lane is selected and the inline/delegate decision is made and announced.
references/routing-classifier.md
中的路由分类器应用于工作请求。分类器会选择主通道,并决定是内联执行还是委托执行。打印一行路由摘要,让用户看到决策结果:
Route: inline (component-author, 1 file)
Route: delegate (component-author → data-fetching-specialist, serial)
完成标志: 已选择通道,确定内联/委托决策并进行公告。

Step 4 — Execute the work

步骤4 — 执行工作

Inline execution

内联执行

For narrow tasks (single lane, ≤ 2 files, no broad repo discovery), do the work directly in this context. Use the dotnet-blazor plugin skills as guidance — read the relevant skill's SKILL.md for patterns and constraints before writing code.
对于范围较窄的任务(单通道、≤2个文件、无需广泛仓库检索),直接在此上下文内完成工作。以dotnet-blazor插件技能为指导——在编写代码前,阅读相关技能的SKILL.md文档,了解模式和约束。

Delegated execution

委托执行

For broader tasks, dispatch via the
task
tool. Each specialist lane receives a bounded task for one lane. Specialist lanes:
LaneScopeGuidance skillDelegate?
component-authorCreate a new component, parameters, lifecycle, CSS isolation
dotnet-blazor:author-component
Inline if ≤ 2 files
component-extractorExtract sections from a page into reusable componentsAlways delegate
form-specialistForms, binding, validation, EditForm, @bind
dotnet-blazor:collect-user-input
Inline if 1–2 files
data-fetching-specialistHttpClient, service abstractions, loading/error/empty states
dotnet-blazor:fetch-and-send-data
Always delegate
Each specialist must return a structured report matching
references/feedback-report-template.json
. On first validation failure, request one schema-repair retry; on second failure, mark the lane
failed_report_schema
and preserve raw output.
对于范围较广的任务,通过
task
工具进行分派。每个专业通道会接收一个限定范围的单通道任务。专业通道如下:
通道范围指导技能是否可内联?
component-author创建新组件、参数、生命周期、CSS隔离
dotnet-blazor:author-component
若≤2个文件则可内联
component-extractor将页面中的部分内容提取为可复用组件始终委托
form-specialist表单、绑定、验证、EditForm、@bind
dotnet-blazor:collect-user-input
若1–2个文件则可内联
data-fetching-specialistHttpClient、服务抽象、加载/错误/空状态
dotnet-blazor:fetch-and-send-data
始终委托
每个专业人员必须返回符合
references/feedback-report-template.json
格式的结构化报告。首次验证失败时,请求一次模式修复重试;第二次失败时,标记该通道为
failed_report_schema
并保留原始输出。

Fluent UI

Fluent UI

Fluent UI is a cross-lane constraint, not a lane. When Fluent components are in scope, invoke the
fluentui-blazor
skill as an overlay alongside the active specialist.
Done when: all specialist work is complete and reports are validated. Every specialist report conforms to the feedback-report schema.
Fluent UI是跨通道约束,而非独立通道。当涉及Fluent组件时,在调用当前专业技能的同时叠加调用
fluentui-blazor
技能。
完成标志: 所有专业工作已完成,且报告通过验证。每份专业报告均符合反馈报告模式。

Step 5 — Review gate

步骤5 — 评审关卡

Check the
skip_code_review
flag that was parsed in step 2. This is a gate — make the decision before dispatching any review sub-agent.
When
skip_code_review
is true:
do not spawn a review sub-agent. Set
review_outcome
to
"skipped"
. Proceed to step 6.
When
skip_code_review
is false:
run the review loop — a dedicated review sub-agent via the
task
tool with
agent_type: "code-review"
. The review loop:
  • Maximum 3 passes (initial + 2 fix-and-review cycles).
  • Stop early when a pass returns zero actionable findings.
  • Actionable = concrete defect, file-specific, not stylistic. See
    references/review-loop-contract.md
    .
The decision is made here, not during execution — the review sub-agent is only dispatched when the flag was not set, and only after all specialist work is complete.
Done when: review is complete or skipped. Either zero actionable findings remain, or unresolved findings are recorded for the run summary.
检查步骤2中解析得到的
skip_code_review
标志。这是一个关卡——在分派任何评审子代理前做出决策。
skip_code_review
为true时:
不生成评审子代理。将
review_outcome
设置为
"skipped"
。继续执行步骤6。
skip_code_review
为false时:
运行评审循环——通过
task
工具调用专用评审子代理,设置
agent_type: "code-review"
。评审循环规则:
  • 最多3轮(初始评审 + 2次修复-评审循环)。
  • 若某一轮评审未发现可操作问题,则提前终止。
  • 可操作问题指具体缺陷、针对特定文件的问题,而非风格问题。详见
    references/review-loop-contract.md
决策在此阶段做出,而非执行阶段——仅当未设置跳过标志,且所有专业工作完成后,才会分派评审子代理。
完成标志: 评审已完成或已跳过。要么无剩余可操作问题,要么已记录未解决问题用于运行总结。

Step 6 — Write run artifacts

步骤6 — 生成运行工件

Write
analysis.json
to
~/.self-improve-reports/blazor-architect/runs/<run_id>/
containing:
  • run_id
    ,
    final_status
    (precedence: failed > blocked > partial > success)
  • status_counts
    ,
    lane_outcomes[]
  • review_outcome
    (passed / fixed / review_unresolved / skipped)
  • follow_up_items[]
    when status is partial or blocked
Create the run directory if it does not exist.
Done when:
analysis.json
is written to the run directory.
analysis.json
写入
~/.self-improve-reports/blazor-architect/runs/<run_id>/
目录,文件应包含:
  • run_id
    final_status
    (优先级:failed > blocked > partial > success)
  • status_counts
    lane_outcomes[]
  • review_outcome
    (passed / fixed / review_unresolved / skipped)
  • 当状态为partial或blocked时,包含
    follow_up_items[]
若运行目录不存在则创建。
完成标志:
analysis.json
已写入运行目录。

Step 7 — Self-improvement (only when
--self-improve
is set)

步骤7 — 自我优化(仅当设置
--self-improve
时执行)

When
--self-improve
is active, load the
self-improve
skill and execute its steps. The self-improve skill generates the improvement report and launches the report-server. Follow self-improve's steps exactly — do not inline its algorithm here.
When
--self-improve
is not set, skip this step entirely.
Done when: self-improve steps are complete (report generated, server launched) OR the flag was not set.
--self-improve
激活时,加载
self-improve
技能并执行其步骤。自我优化技能会生成改进报告并启动报告服务器。严格遵循自我优化技能的步骤——不要在此处内联其算法。
当未设置
--self-improve
时,完全跳过此步骤。
完成标志: 自我优化步骤已完成(报告生成、服务器启动),或未设置该标志。

Step 8 — Print the run summary

步骤8 — 打印运行总结

Close every run with a summary block. This is the user's primary feedback — make it informative:
[blazor-architect] run-20260802-1716 complete
  lanes:     component-author
  status:    success
  review:    passed
  files:     src/Konqvist.Web/Components/Pages/Counter.razor (created)
  artifacts: ~/.self-improve-reports/blazor-architect/runs/run-20260802-1716/analysis.json
  follow-up: none
When
--self-improve
was active, also include:
  report:    ~/.self-improve-reports/blazor-architect/runs/run-20260802-1716/improvement-report-data.json
  server:    http://127.0.0.1:5173/api/report (running)
When
final_status
is
partial
or
blocked
, surface blocked/failed lane names and recommended next actions.
Done when: the summary block is printed with all fields populated.
每个运行结束时输出总结块。这是用户的主要反馈信息——需确保内容详实:
[blazor-architect] run-20260802-1716 complete
  lanes:     component-author
  status:    success
  review:    passed
  files:     src/Konqvist.Web/Components/Pages/Counter.razor (created)
  artifacts: ~/.self-improve-reports/blazor-architect/runs/run-20260802-1716/analysis.json
  follow-up: none
--self-improve
激活时,还需添加:
  report:    ~/.self-improve-reports/blazor-architect/runs/run-20260802-1716/improvement-report-data.json
  server:    http://127.0.0.1:5173/api/report (running)
final_status
partial
blocked
时,需显示受阻/失败的通道名称以及建议的后续操作。
完成标志: 已打印填充所有字段的总结块。",