harden sm-flow protocol and archive v4.0 validation runs
- Rewrite hard constraint #1: apply must read Committed OpenSpec files as the execution source of truth - Promote sub-skill invocation to hard constraint #6; remove fallbacks.md and all degradation paths - Add file existence verification at commit and archive exit gates - Require grill question pool, evidence-driven conclusions, and user-interview confirmations to be written to decisions.md - Record v4.0 validation retrospective in workflow.md: propose overreach, sub-skill pseudo-calling, spec omitting user behavior - Archive knowledge-index-sort OpenSpec and devflow entries from prior run
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
# knowledge-index-sort Proposal
|
||||
|
||||
## 问题
|
||||
|
||||
knowledge-index-panel 当前条目按 ENTRIES 数组原始顺序渲染,用户无法按日期或标签排序查看。
|
||||
|
||||
## 建议方案
|
||||
|
||||
在筛选栏(filter-row)中添加排序下拉框,支持按日期(新→旧/旧→新)和标签数量(多→少/少→多)排序。
|
||||
|
||||
## 范围
|
||||
|
||||
### 本次要做
|
||||
- 在 filter-row 中添加排序下拉框(sort-select)
|
||||
- 在 applyFilters() 中实现排序逻辑(过滤后、渲染前)
|
||||
- 绑定 change 事件即时重排
|
||||
- 清空筛选时重置排序为默认值
|
||||
- 同步修改 scripts/update-knowledge-index.sh
|
||||
|
||||
### 本次不做
|
||||
- 多列排序
|
||||
- 拖拽排序
|
||||
- 修改 ENTRIES 数据结构
|
||||
- 分页
|
||||
|
||||
### 影响区域
|
||||
- `knowledge-index.html`(HTML + CSS + JS)
|
||||
- `scripts/update-knowledge-index.sh`(同步修改)
|
||||
|
||||
## 非目标
|
||||
|
||||
- 不做服务端排序(纯前端客户端改动)
|
||||
- 不做排序状态持久化(刷新后恢复默认)
|
||||
- 不修改知识条目数据结构
|
||||
|
||||
## 风险
|
||||
|
||||
- **低风险**:纯前端改动,单文件 + 生成脚本
|
||||
- **兼容性**:已有 3 个条目,排序逻辑简单(日期字符串比较 + 数组长度比较)
|
||||
- **性能**:3 条目的排序开销可忽略,即使未来增长到 50 条也无压力
|
||||
|
||||
## 上下文约束
|
||||
|
||||
- 排序必须在过滤后生效(与年份筛选、标签筛选、搜索取交集)
|
||||
- 与其他控件保持一致的即时响应模式(change 事件)
|
||||
- 清空筛选时重置所有控件(包括排序)
|
||||
Reference in New Issue
Block a user