build-feature
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: Build feature command
- 主要操作:构建功能命令
Trigger Conditions
触发条件
- Command syntax: /build-feature [args]
- Ensure prerequisites are met before execution.
- 命令语法:/build-feature [参数]
- 执行前确保满足先决条件。
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):
- 通过视觉检查或元数据检查列出所有候选资产
- 实施前与用户确认正确的资产
- 记录选择理由
Feature Restoration vs New Feature
功能恢复 vs 新功能
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 from historical commits
- Apply proven patterns to current codebase
- AVOID: Reinventing solutions that previously worked
For NEW features:
- Check if similar patterns exist in codebase
- Follow established conventions (grid layouts, component structure)
- Iterate with user feedback
对于“恢复”、“添加回去”或“带回”请求:
- 首先:研究git历史以找到原始实现
bash
git log --all --oneline -- <file> git show <commit>:<file> - 从历史提交中提取可行的实现模式
- 将经过验证的模式应用到当前代码库
- 避免:重新发明之前已可行的解决方案
对于新功能:
- 检查代码库中是否存在类似模式
- 遵循已确立的约定(网格布局、组件结构)
- 结合用户反馈迭代
Layout Implementation Strategy
布局实施策略
- Hero sections with text + image -> Grid-based layout (lg:grid-cols-12)
- Card layouts -> Consistent spacing and responsive breakpoints
- If >3 positioning iterations needed -> STOP and research existing patterns or ask for design reference
- 包含文本+图片的Hero区域 -> 基于网格的布局(lg:grid-cols-12)
- 卡片布局 -> 一致的间距和响应式断点
- 如果需要超过3次定位迭代 -> 停止并研究现有模式或请求设计参考
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
示例调用
- /build-feature example
- /build-feature 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>BUILD_FEATURE_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>BUILD_FEATURE_VERILINGUA_VERIX_COMPLIANT</promise> [conf:0.88] [state:confirmed]