fix-bug
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseLIBRARY-FIRST PROTOCOL (MANDATORY)
库优先协议(强制性要求)
Before writing ANY code, you MUST check:
在编写任何代码之前,你必须检查:
Step 1: Library Catalog
步骤1:库目录
- Location:
.claude/library/catalog.json - If match >70%: REUSE or ADAPT
- 位置:
.claude/library/catalog.json - 若匹配度>70%:复用或适配
Step 2: Patterns Guide
步骤2:模式指南
- Location:
.claude/docs/inventories/LIBRARY-PATTERNS-GUIDE.md - If pattern exists: FOLLOW documented approach
- 位置:
.claude/docs/inventories/LIBRARY-PATTERNS-GUIDE.md - 若模式已存在:遵循文档中记录的方法
Step 3: Existing Projects
步骤3:现有项目
- Location:
D:\Projects\* - If found: EXTRACT and adapt
- 位置:
D:\Projects\* - 若找到相关内容:提取并适配
Decision Matrix
决策矩阵
| Match | Action |
|---|---|
| Library >90% | REUSE directly |
| Library 70-90% | ADAPT minimally |
| Pattern exists | FOLLOW pattern |
| In project | EXTRACT |
| No match | BUILD (add to library after) |
| 匹配度 | 操作 |
|---|---|
| 库匹配度>90% | 直接复用 |
| 库匹配度70-90% | 最小程度适配 |
| 模式已存在 | 遵循模式 |
| 项目中存在 | 提取 |
| 无匹配项 | 构建(完成后添加到库中) |
STANDARD OPERATING PROCEDURE
标准操作流程
Purpose
目的
- Primary action: Fix bug command
- 核心操作:修复Bug命令
Trigger Conditions
触发条件
- Command syntax: /fix-bug [args]
- Ensure prerequisites are met before execution.
- 命令语法:/fix-bug [参数]
- 执行前需确保满足前置条件。
Inputs and Options
输入与选项
- Inputs: No structured parameters defined; capture user intent explicitly.
- 输入:未定义结构化参数;需明确捕获用户意图。
Execution Phases
执行阶段
- Review the request and confirm scope.
- Execute the command flow.
- Summarize outcomes and next actions.
- 审核请求并确认范围。
- 执行命令流程。
- 总结结果与后续操作。
Success Criteria and Outputs
成功标准与输出
- Document artifacts, decisions, and follow-up actions clearly.
- 清晰记录工件、决策及后续操作。
Error Handling and Recovery
错误处理与恢复
- If execution fails, capture the failure mode, retry with verbose context, and surface actionable remediation steps.
- 若执行失败,记录失败模式,结合详细上下文重试,并提供可执行的修复步骤。
Chaining and Coordination
链式调用与协调
Memory and Tagging
记忆与标记
- Tag session outputs with who/when/why for traceability.
- 为会话输出标记责任人/时间/原因,以便追溯。
LEARNED PATTERNS (Session: 2026-01-07)
已总结模式(会话:2026-01-07)
Asset Selection Protocol
资产选择协议
When multiple similar assets exist (e.g., headshot.jpg vs headshot.png):
- List all candidates with visual inspection or metadata check
- Confirm correct asset with user before implementation
- Document reasoning for selection
当存在多个相似资产时(例如:headshot.jpg vs headshot.png):
- 通过视觉检查或元数据检查列出所有候选资产
- 实施前与用户确认正确的资产
- 记录选择理由
Layout Restoration Pattern
布局恢复模式
For "restore", "add back", or "bring back" requests:
- FIRST: Research git history to find original implementation
bash
git log --all --oneline -- <file> git show <commit>:<file> - Extract working implementation patterns
- Apply to current codebase
- AVOID: Trial-and-error positioning attempts without historical context
对于“恢复”、“添加回去”或“带回”类请求:
- 首先:查询Git历史以找到原始实现
bash
git log --all --oneline -- <file> git show <commit>:<file> - 提取可运行的实现模式
- 应用到当前代码库
- 避免:在没有历史上下文的情况下尝试反复调整位置
Positioning Decision Tree
定位决策树
- Hero sections with text + image -> Grid-based layout (lg:grid-cols-12)
- Simple overlays -> Absolute positioning
- If >3 positioning iterations needed -> STOP and research git history or ask for design reference
- 包含文本+图片的Hero区域 -> 基于网格的布局(lg:grid-cols-12)
- 简单覆盖层 -> 绝对定位
- 若定位调整超过3次 -> 停止操作并查询Git历史或请求设计参考
User Frustration Signals
用户受挫信号
Phrases like "this is getting sad", "stop", "reverse all changes" indicate:
- Trigger: Immediate rollback + strategy pivot required
- Response: Research historical solutions or ask for design reference
- Never continue iterating after frustration signals
类似“这太糟糕了”、“停止”、“撤销所有更改”的表述表明:
- 触发操作:需立即回滚并调整策略
- 响应方式:查询历史解决方案或请求设计参考
- 收到受挫信号后绝不能继续迭代
Example Invocation
调用示例
- /fix-bug example
- /fix-bug example
Output Format
输出格式
- Provide a concise summary, actions taken, artifacts generated, and recommended next steps.
- Always include an explicit confidence line: "Confidence: X.XX (ceiling: TYPE Y.YY)".
- Use ceilings — inference/report: 0.70, research: 0.85, observation: 0.95, definition: 0.95.
- Keep user-facing output in plain English; reserve VCL markers for the appendix only.
Confidence: 0.86 (ceiling: observation 0.95) - SOP rewritten to Prompt-Architect pattern based on legacy command content.
- 提供简洁的总结、已执行操作、生成的工件及推荐后续步骤。
- 始终包含明确的置信度行:"Confidence: X.XX (ceiling: TYPE Y.YY)"。
- 使用置信度上限——推理/报告:0.70,研究:0.85,观察:0.95,定义:0.95。
- 用户可见输出使用简洁英文;仅在附录中保留VCL标记。
Confidence: 0.86 (ceiling: observation 0.95) - SOP已基于旧版命令内容重写为Prompt-Architect模式。
VCL COMPLIANCE APPENDIX (Internal Reference)
VCL合规附录(内部参考)
[[HON:teineigo]] [[MOR:root:PA]] [[COM:PromptArchitect]] [[CLS:ge_command]] [[EVD:-DI<gozlem>]] [[ASP:nesov.]] [[SPC:path:/commands]]
[define|neutral] CONFIDENCE_CEILINGS := {inference:0.70, report:0.70, research:0.85, observation:0.95, definition:0.95} [conf:0.9] [state:confirmed]
[direct|emphatic] L2_LANGUAGE := English; user-facing outputs exclude VCL markers. [conf:0.99] [state:confirmed]
[commit|confident] <promise>FIX_BUG_VERILINGUA_VERIX_COMPLIANT</promise> [conf:0.88] [state:confirmed]
[[HON:teineigo]] [[MOR:root:PA]] [[COM:PromptArchitect]] [[CLS:ge_command]] [[EVD:-DI<gozlem>]] [[ASP:nesov.]] [[SPC:path:/commands]]
[define|neutral] CONFIDENCE_CEILINGS := {inference:0.70, report:0.70, research:0.85, observation:0.95, definition:0.95} [conf:0.9] [state:confirmed]
[direct|emphatic] L2_LANGUAGE := English; user-facing outputs exclude VCL markers. [conf:0.99] [state:confirmed]
[commit|confident] <promise>FIX_BUG_VERILINGUA_VERIX_COMPLIANT</promise> [conf:0.88] [state:confirmed]