@namewta/speculo 0.8.13 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -5
- package/dist/src/cli.js +12 -1
- package/dist/src/cli.js.map +1 -1
- package/dist/src/doctor.d.ts +10 -0
- package/dist/src/doctor.js +70 -0
- package/dist/src/doctor.js.map +1 -0
- package/dist/src/index.js +105 -56
- package/dist/src/index.js.map +1 -1
- package/dist/src/kernel.d.ts +98 -0
- package/dist/src/kernel.js +29 -0
- package/dist/src/kernel.js.map +1 -0
- package/dist/src/refresh.js +55 -24
- package/dist/src/refresh.js.map +1 -1
- package/dist/src/structured.d.ts +2 -2
- package/dist/src/structured.js +114 -241
- package/dist/src/structured.js.map +1 -1
- package/package.json +3 -2
- package/template/.speculo/README.md +1 -1
- package/template/.speculo/capabilities.json +14 -0
- package/template/.speculo/kernel/README.md +10 -0
- package/template/.speculo/kernel/capability-profile.schema.json +14 -0
- package/template/.speculo/kernel/checkpoint.schema.json +7 -0
- package/template/.speculo/kernel/trace-event.schema.json +8 -0
- package/template/.speculo/kernel/workflow-manifest.schema.json +13 -0
- package/template/.speculo/kernel.json +10 -0
- package/template/.speculo/refresh-contract.json +4 -1
- package/template/AGENTS.md +0 -3
- package/template/commands/archive-and-consolidate.md +13 -40
- package/template/commands/status.md +3 -3
- package/template/workflows/learning/A-archive/A-archive.md +25 -0
- package/template/workflows/learning/A-assess-and-plan/A-assess-and-plan.md +17 -23
- package/template/workflows/learning/A-assess-and-plan/background-template.md +13 -0
- package/template/workflows/learning/A-assess-and-plan/change-status-template.json +21 -14
- package/template/workflows/learning/A-assess-and-plan/course-template.md +28 -0
- package/template/workflows/learning/C-consolidate/C-consolidate.md +33 -0
- package/template/workflows/learning/H-homework/H-homework.md +31 -0
- package/template/workflows/learning/H-homework/homework-template.md +63 -0
- package/template/workflows/learning/I-init-setup/I-init-setup.md +14 -19
- package/template/workflows/learning/I-init-setup/context-index-template.md +3 -3
- package/template/workflows/learning/I-init-setup/learner-profile-template.md +12 -10
- package/template/workflows/learning/I-init-setup/review-index-template.md +1 -1
- package/template/workflows/learning/INDEX.md +7 -9
- package/template/workflows/learning/L-lesson/L-lesson.md +32 -0
- package/template/workflows/learning/L-lesson/lesson-template.md +51 -0
- package/template/workflows/learning/R-review/R-review.md +13 -18
- package/template/workflows/learning/R-review/review-template.md +13 -6
- package/template/workflows/learning/README.md +86 -81
- package/template/workflows/learning/_state/status.json +1 -1
- package/template/workflows/learning/common/rules/artifact-contract.md +11 -25
- package/template/workflows/learning/common/rules/assessment-policy.md +9 -4
- package/template/workflows/learning/common/rules/knowledge-organization.md +4 -6
- package/template/workflows/learning/common/rules/mastery-policy.md +3 -19
- package/template/workflows/learning/common/rules/path-reference-contract.md +3 -5
- package/template/workflows/learning/common/rules/teaching-policy.md +9 -9
- package/template/workflows/learning/common/schemas/change-status.schema.json +46 -18
- package/template/workflows/learning/common/schemas/status.schema.json +25 -24
- package/template/workflows/learning/common/skills/topic-synthesis/SKILL.md +17 -0
- package/template/workflows/learning/common/skills/topic-synthesis/claim-template.md +15 -0
- package/template/workflows/learning/common/tools/relocate-learning.mjs +208 -0
- package/template/workflows/learning/common/tools/validate-learning.mjs +195 -297
- package/template/workflows/learning/manifest.json +1 -0
- package/template/workflows/learning/runtime-contract.json +3 -2
- package/template/workflows/ops/manifest.json +1 -0
- package/template/workflows/person/manifest.json +1 -0
- package/template/workflows/specdev/manifest.json +1 -0
- package/template/workflows/workflow-manifest.schema.json +14 -0
- package/template/workflows/learning/A-archive-and-consolidate/A-archive-and-consolidate.md +0 -38
- package/template/workflows/learning/A-archive-and-consolidate/promotion-plan-template.md +0 -23
- package/template/workflows/learning/A-assess-and-plan/learning-plan-template.md +0 -28
- package/template/workflows/learning/E-eli5/E-eli5.md +0 -37
- package/template/workflows/learning/E-eli5/lesson-template.md +0 -31
- package/template/workflows/learning/P-practice/P-practice.md +0 -34
- package/template/workflows/learning/P-practice/practice-template.md +0 -16
- package/template/workflows/learning/Q-quiz/Q-quiz.md +0 -34
- package/template/workflows/learning/Q-quiz/quiz-artifact-template.md +0 -16
- package/template/workflows/learning/common/skills/knowledge-promotion/SKILL.md +0 -46
- package/template/workflows/learning/common/skills/knowledge-promotion/domain-index-template.md +0 -6
- package/template/workflows/learning/common/skills/knowledge-promotion/domain-overview-template.md +0 -19
- package/template/workflows/learning/common/skills/knowledge-promotion/knowledge-template.md +0 -25
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
|
|
11
11
|
配置使用 `.speculo/baselines/` 中的上次模板默认值执行 base/local/incoming 三方合并:模板新增项自动增加,模板删除项直接删除,未被用户修改的旧默认值跟随模板更新,用户覆盖值在满足目标合同的前提下保留。只有字段删除、显式 schema 迁移或结构化文件变换时,CLI 才把原文件写入 `back/` 并生成 targeted manifest;opaque 内容不会被整包复制到备份。
|
|
12
12
|
|
|
13
|
-
`install.json` 使用 schema
|
|
13
|
+
`install.json` 使用 schema v3,记录包版本、已安装 workflows、managed manifest 路径和 baseline schema。`kernel.json` 定义共享 change、风险、checkpoint、能力和 trace 位置。Speculo 1.0 不读取或迁移任何 0.x 安装;检测到旧 manifest 时必须先由用户移除或改名旧 `speculo/` 目录。初始化以项目锁、完整 staging、active fingerprint 复验、原子 rename 与失败 rollback 组成一个事务;冲突不会发布部分结果,也不会创建新的 pending marker。
|
|
14
14
|
|
|
15
15
|
## 读取顺序
|
|
16
16
|
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema_version": 1,
|
|
3
|
+
"model": {
|
|
4
|
+
"id": "unknown",
|
|
5
|
+
"provider": "unknown",
|
|
6
|
+
"modalities": ["text"],
|
|
7
|
+
"context_window": 0,
|
|
8
|
+
"max_output": 0,
|
|
9
|
+
"reasoning_levels": []
|
|
10
|
+
},
|
|
11
|
+
"tools": {"classes": ["read-only"], "parallel": false, "programmatic": false},
|
|
12
|
+
"execution": {"sandbox": false, "network": false, "filesystem_roots": [], "data_retention": "session"},
|
|
13
|
+
"memory": {"compaction": false, "persistent": true, "cache": false}
|
|
14
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# Speculo Runtime Kernel
|
|
2
|
+
|
|
3
|
+
The kernel is the provider-neutral persistence contract shared by every workflow.
|
|
4
|
+
|
|
5
|
+
- `events.jsonl` is append-only and records transitions, tools, approvals and evidence.
|
|
6
|
+
- `context/checkpoint.json` is the minimum recovery input after compaction or session loss.
|
|
7
|
+
- `capabilities.json` is a model/tool/sandbox capability snapshot captured at run start.
|
|
8
|
+
- `trace/` stores immutable run traces used by offline scenario evaluation.
|
|
9
|
+
|
|
10
|
+
Workflow packages declare stages and domain artifacts; they do not redefine lifecycle, risk, approval, or recovery semantics.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "urn:speculo:kernel:capability-profile:v1",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"required": ["schema_version", "model", "tools", "execution", "memory"],
|
|
6
|
+
"properties": {
|
|
7
|
+
"schema_version": {"const": 1},
|
|
8
|
+
"model": {"type": "object", "required": ["id", "modalities", "context_window", "max_output", "reasoning_levels"]},
|
|
9
|
+
"tools": {"type": "object", "required": ["classes", "parallel", "programmatic"]},
|
|
10
|
+
"execution": {"type": "object", "required": ["sandbox", "network", "filesystem_roots", "data_retention"]},
|
|
11
|
+
"memory": {"type": "object", "required": ["compaction", "persistent", "cache"]}
|
|
12
|
+
},
|
|
13
|
+
"additionalProperties": false
|
|
14
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "urn:speculo:kernel:checkpoint:v1",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"required": ["schema_version", "change_id", "stage", "locked_decisions", "open_questions", "next_action", "evidence", "state_digest", "created_at"],
|
|
6
|
+
"properties": {"schema_version": {"const": 1}, "change_id": {"type": "string"}, "stage": {"type": "string"}, "locked_decisions": {"type": "array", "items": {"type": "string"}}, "open_questions": {"type": "array", "items": {"type": "string"}}, "next_action": {"type": "string"}, "evidence": {"type": "array", "items": {"type": "string"}}, "state_digest": {"type": "string"}, "created_at": {"type": "string", "format": "date-time"}}
|
|
7
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "urn:speculo:kernel:trace-event:v1",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"required": ["schema_version", "sequence", "at", "kind", "payload"],
|
|
6
|
+
"properties": {"schema_version": {"const": 1}, "sequence": {"type": "integer", "minimum": 1}, "at": {"type": "string", "format": "date-time"}, "kind": {"enum": ["capability", "context", "tool", "transition", "approval", "evidence"]}, "payload": {"type": "object"}},
|
|
7
|
+
"additionalProperties": false
|
|
8
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "urn:speculo:kernel:workflow-manifest:v1",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"required": ["schema_version", "id", "version", "stages"],
|
|
6
|
+
"properties": {
|
|
7
|
+
"schema_version": {"const": 1},
|
|
8
|
+
"id": {"type": "string"},
|
|
9
|
+
"version": {"type": "string"},
|
|
10
|
+
"stages": {"type": "array", "items": {"type": "object", "required": ["id", "after", "inputs", "outputs", "risk", "context_budget"]}}
|
|
11
|
+
},
|
|
12
|
+
"additionalProperties": false
|
|
13
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema_version": 1,
|
|
3
|
+
"runtime": "speculo-kernel",
|
|
4
|
+
"change_lifecycle": ["draft", "active", "blocked", "awaiting_user", "completed", "archived", "cancelled"],
|
|
5
|
+
"risk_classes": ["read-only", "local-reversible", "local-destructive", "external-mutation", "production-critical"],
|
|
6
|
+
"event_log": ".speculo/events.jsonl",
|
|
7
|
+
"checkpoint": ".speculo/context/checkpoint.json",
|
|
8
|
+
"capability_profile": ".speculo/capabilities.json",
|
|
9
|
+
"trace": ".speculo/trace/"
|
|
10
|
+
}
|
|
@@ -9,12 +9,15 @@
|
|
|
9
9
|
"managed_metadata": [
|
|
10
10
|
".speculo/README.md",
|
|
11
11
|
".speculo/workspace.json",
|
|
12
|
-
".speculo/refresh-contract.json"
|
|
12
|
+
".speculo/refresh-contract.json",
|
|
13
|
+
".speculo/kernel.json"
|
|
13
14
|
],
|
|
14
15
|
"reserved_runtime": [
|
|
15
16
|
"README.md",
|
|
16
17
|
"workspace.json",
|
|
17
18
|
"refresh-contract.json",
|
|
19
|
+
"kernel.json",
|
|
20
|
+
"kernel",
|
|
18
21
|
"install.json",
|
|
19
22
|
"managed.json",
|
|
20
23
|
"migration.json",
|
package/template/AGENTS.md
CHANGED
|
@@ -3,58 +3,31 @@ id: archive-and-consolidate
|
|
|
3
3
|
type: command
|
|
4
4
|
name: Archive and Consolidate
|
|
5
5
|
description: >
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
keywords: [archive, consolidate, knowledge, cleanup, adr, 归档, 知识合并, 清理, 收尾]
|
|
6
|
+
统一入口:Learning 先做用户确认的主题整合或冷归档,其他 workflow 继续使用各自的归档合同。
|
|
7
|
+
keywords: [archive, consolidate, learning, topic, cold-archive, 归档, 综合]
|
|
9
8
|
---
|
|
10
9
|
|
|
11
10
|
# Archive and Consolidate 命令
|
|
12
11
|
|
|
13
12
|
## 报告
|
|
14
13
|
|
|
15
|
-
统一写入:`<Path>{roots.state}/commands/archive-and-consolidate/{date}-{scope}-{topic}[-NN].md</Path
|
|
14
|
+
统一写入:`<Path>{roots.state}/commands/archive-and-consolidate/{date}-{scope}-{topic}[-NN].md</Path>`。报告记录 workflow、source/root IDs、dry-run 清单、用户确认、relocation manifest、synthesis revision 或 archive locator 和验证结果。
|
|
16
15
|
|
|
17
|
-
|
|
16
|
+
## Learning 路由
|
|
18
17
|
|
|
19
|
-
|
|
18
|
+
目标 workflow 为 Learning 时,读取 `<Path>{roots.workflows}/learning/README.md</Path>`,由用户明确选择一个 Work:
|
|
20
19
|
|
|
21
|
-
|
|
20
|
+
- `C-consolidate`:生成 source manifest 和 dry-run;确认后调用 `<Path>{roots.workflows}/learning/common/tools/relocate-learning.mjs</Path>` 物理移动 active/closed Change 到父 Change 的 `children/`,再生成带 provenance 的 synthesis。未确认时不得移动或更新 context。
|
|
21
|
+
- `A-archive`:只处理用户 close/confirm 的 root Change 树,以最新源更新时间决定 `archive/YYYY-MM/`,不要求 Homework、R 或 mastery,也不写 context。
|
|
22
22
|
|
|
23
|
-
|
|
24
|
-
- `archive-batch`:只读列出全部 completed Ops tuples 和各自复盘/提升状态,生成 command 报告后停止。知识合并与归档必须逐 change 进入 A 并分别批准,不能用一次跨项目确认替代多个精确 promotion manifest。
|
|
23
|
+
不得把 Learning 交给共享的根级机械归档 skill;该 skill 不能理解递归 locator、parent lock 或单文件 Homework 证据。已冷归档树保持只读,需先由用户显式恢复才能作为 C 的可移动 source。
|
|
25
24
|
|
|
26
|
-
|
|
25
|
+
## 其他 workflow
|
|
27
26
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
### archive-single
|
|
31
|
-
|
|
32
|
-
归档并合并单个已完成 change 的知识。
|
|
33
|
-
|
|
34
|
-
1. 读取 `<Path>{roots.skills}/archive-and-consolidate/SKILL.md</Path>`,执行路径解析(Step 0),解析 `<Path>{roots.config}</Path>`(不存在时静默降级)。
|
|
35
|
-
2. 选择一个 `change_status: completed` 的 change。
|
|
36
|
-
3. 目标为 SpecDev 时先读取 `<Path>{roots.workflows}/specdev/common/rules/change-completion.md</Path>` 与当前 change 的 `<Path>{roots.state}/specdev/changes/{change}/triage.md</Path>`:完成门必须通过,`external_action` 必须为 `closed | waived | not-applicable`;pending/failed 返回 Triage,不生成可执行归档计划。
|
|
37
|
-
4. 执行 Step 1-5:扫描 stores、扫描 change、生成归档计划、生成合并计划、生成清理候选。
|
|
38
|
-
5. 默认 dry-run:将完整计划写入报告文件,展示摘要并等待用户显式确认。
|
|
39
|
-
6. 确认后以 mode=`confirmed` 执行 Step 7-8:归档移动、合并写入、清理、重读验证。
|
|
40
|
-
7. 执行结果作为补遗追加到原报告。
|
|
41
|
-
|
|
42
|
-
### archive-batch
|
|
43
|
-
|
|
44
|
-
批量归档并合并所有已完成 change 的知识。
|
|
45
|
-
|
|
46
|
-
1. 读取 `<Path>{roots.skills}/archive-and-consolidate/SKILL.md</Path>`,执行路径解析。
|
|
47
|
-
2. 扫描目标 workflow 下所有 `change_status: completed` 的 change。不接受 active 或 broken 状态。
|
|
48
|
-
3. SpecDev 候选逐个通过 change completion 与 external reconcile 门;任一 pending/failed 阻塞整批。
|
|
49
|
-
4. 执行 Step 1-5:扫描 stores、逐 change 扫描、批量预检、合并计划、清理候选。
|
|
50
|
-
5. 批量原子性:任一预检失败阻塞整批。
|
|
51
|
-
6. 默认 dry-run:将完整计划写入报告文件,展示摘要并等待用户显式确认。
|
|
52
|
-
7. 确认后逐项执行:归档移动 → 合并写入 → 清理 → 重读验证。失败时报告已完成/未完成清单。
|
|
27
|
+
非 Learning 目标继续读取自身 README 和归档 Work,Command 报告只记录选择和 owning Work 返回的 manifest,不成为知识 writer。
|
|
53
28
|
|
|
54
29
|
## 完成标准
|
|
55
30
|
|
|
56
|
-
-
|
|
57
|
-
-
|
|
58
|
-
-
|
|
59
|
-
- 合并写入的每条知识有来源 change 标注。
|
|
60
|
-
- 每个清理候选有分类和理由。
|
|
31
|
+
- dry-run、确认、移动、回滚和最终验证均有报告;
|
|
32
|
+
- 原始 Markdown 内容不被覆盖,跨路径引用通过 stable ID/locations 解析;
|
|
33
|
+
- 未确认或失败事务不留下部分移动或 context 写入。
|
|
@@ -10,8 +10,8 @@ keywords: [status, 状态, active, blocked]
|
|
|
10
10
|
|
|
11
11
|
1. 读取 `<Path>{roots.state}/workspace.json</Path>`,解析 `<Path>{roots.config}</Path>`(不存在时以默认值静默降级),获取全部已安装 workflow/state 根。
|
|
12
12
|
2. 扫描 `<Path>{roots.workflows}/{workflow}/INDEX.md</Path>`,得到已安装 workflow ids。
|
|
13
|
-
3. 对每个 id 读取 `<Path>{roots.state}/{workflow}/status.json</Path>`,按该 workflow 自己的 schema 解释,不把 SpecDev 字段套到其他 workflow。
|
|
14
|
-
4. 报告 active 数量、各
|
|
15
|
-
5. 报告 archived 数量和完整 scope/project/change locator;Learning 同时读取 `context/REVIEW.md`
|
|
13
|
+
3. 对每个 id 读取 `<Path>{roots.state}/{workflow}/status.json</Path>`,按该 workflow 自己的 schema 解释,不把 SpecDev 字段套到其他 workflow。Learning schema v2 的 active/archived entry 携带 stable `change_id`、kind、parent/root、current locator、current_work、Homework 和 retention projection;递归 Change 位于 `changes/**` 或 `archive/**`,位置历史读取 `<Path>{roots.state}/learning/locations.json</Path>`。SpecDev 继续使用 schema v5 根级 `changes/<change>`/`archive/YYYY-MM/<change>`;Ops schema v2 仍使用 `<Path>{roots.state}/ops/projects/{project_id}/changes/{change}/.status.json</Path>` 或对应 `archive/YYYY-MM/{change}/.status.json`。不得按 change 名跨 workflow 合并。
|
|
14
|
+
4. 报告 active 数量、各 Change 的 `current_work`、去重后的 `works_run`、生命周期、parent/root、最近更新时间和停滞 Change(`.status.json` 超过 14 天未更新)。SpecDev 额外报告调查 claims 与 triage `external_action`;Learning 额外报告 domain/topic、Lesson/Homework、immediate/retention 和 synthesis 状态;Ops 额外报告 scope/project、phase、outcome、current plan/approval、latest attempt 和 blockers,并把同名不同项目 Change 分行展示。
|
|
15
|
+
5. 报告 archived 数量和完整 scope/project/change locator;Learning 同时读取 `context/REVIEW.md` 汇总到期 Review、topic evidence status 和需要刷新内容。预期归档目录或 `.status.json` 缺失、active/archived 重叠、parent cycle、位置登记不一致、未知 schema、断开链接和 malformed 目录均列为异常,不自动修复。
|
|
16
16
|
6. 报告没有 workflow 资产的孤立状态根,以及缺少状态根的已安装 workflow;不自动修复。
|
|
17
17
|
7. 用户要求持久化时写入 `<Path>{roots.state}/commands/status/{date}-workspace-{topic}[-NN].md</Path>`,并在报告中列出本次扫描的 workflow 选择。
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: learning/archive
|
|
3
|
+
type: workflow-entry
|
|
4
|
+
workflow: learning
|
|
5
|
+
name: 冷归档
|
|
6
|
+
description: 用户明确关闭后移动整个 Change 树到日期目录;不做知识综合或掌握判断。
|
|
7
|
+
keywords: [archive, cold-archive, close]
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# 冷归档
|
|
11
|
+
|
|
12
|
+
> 激活本 Work 后,先读取 `<Path>{roots.workflows}/learning/README.md</Path>`。
|
|
13
|
+
|
|
14
|
+
## 流程
|
|
15
|
+
|
|
16
|
+
1. 用户明确指定 root Change 并写入 close/confirm;没有确认只输出待归档清单。
|
|
17
|
+
2. 检查 root 没有 active Work 或活动子树;未完成 Homework、未做 R 或未掌握不构成阻塞,证据随树保留。
|
|
18
|
+
3. 以整棵树所有节点 `updated_at` 的最大值作为 `YYYY-MM`,在锁内 stage 并移动 `changes/<root>` 到 `archive/YYYY-MM/<root>`,更新 locations/status projection。
|
|
19
|
+
4. 验证旧路径不存在、新路径存在、哈希和索引完整;失败回滚。归档树只读,后续纠正通过新 Change;A 不写 context。
|
|
20
|
+
|
|
21
|
+
## 完成标准
|
|
22
|
+
|
|
23
|
+
- 没有静默删除或改写原始课程、作业、答案、Review 或 synthesis;
|
|
24
|
+
- archive 是用户关闭的历史容器,不等同于 mastered;
|
|
25
|
+
- 归档日期以最新源更新时间为准,原始时间和 relocation history 仍可追溯。
|
|
@@ -2,38 +2,32 @@
|
|
|
2
2
|
id: learning/assess-and-plan
|
|
3
3
|
type: workflow-entry
|
|
4
4
|
workflow: learning
|
|
5
|
-
name:
|
|
6
|
-
description:
|
|
7
|
-
keywords: [评估, baseline,
|
|
5
|
+
name: 评估背景并设计课程
|
|
6
|
+
description: 以目标和证据为起点建立课程、背景、基线、来源和可变 Lesson 地图。
|
|
7
|
+
keywords: [评估, baseline, course-design, objectives, background]
|
|
8
8
|
---
|
|
9
9
|
|
|
10
|
-
#
|
|
10
|
+
# 评估背景并设计课程
|
|
11
11
|
|
|
12
|
-
> 激活本 Work 后,先读取 `<Path>{roots.workflows}/learning/README.md</Path
|
|
13
|
-
|
|
14
|
-
本 Work 拥有 intake、baseline、learning plan 和初始 sources。它不开始正式教学,也不根据用户自信度直接宣称掌握。
|
|
12
|
+
> 激活本 Work 后,先读取 `<Path>{roots.workflows}/learning/README.md</Path>`。
|
|
15
13
|
|
|
16
14
|
## 流程
|
|
17
15
|
|
|
18
|
-
1. 确认 I
|
|
19
|
-
2.
|
|
20
|
-
3. 写 `
|
|
21
|
-
4.
|
|
22
|
-
5.
|
|
23
|
-
6.
|
|
24
|
-
7. 写 `sources.md`,区分项目事实、权威外部来源、类比和未知。外部 URL 在使用时验证;无法验证的结论不进入关键目标答案。
|
|
25
|
-
8. 运行 Learning validator。成功后把 phase 设置为 `assessment`,完成本 Work,并路由 E-eli5;失败时保留 blocker 和当前 Work。
|
|
16
|
+
1. 确认 I 已完成,收集学习目标、期望效果、受众、范围、时间、表达基线和深度。缺少会改变课程设计的选择时,一次只问一个问题。
|
|
17
|
+
2. 创建或恢复 `YYYY-MM-DD-<kebab-topic>[-NN]` Change,生成 `.status.json`,设置 `current_work=learning/assess-and-plan`。
|
|
18
|
+
3. 写 `course.md`:可观察 OBJ、先决条件、课程地图、每节 Lesson 的 30–40 分钟预算、可选路径、Homework 映射和成功证据。章节顺序是参考方案,不是强制教学模型。
|
|
19
|
+
4. 写 `background/foundation.md`:主题宏观背景、概念关系、术语、历史/上下文和学习前置知识;另写 `baseline.md` 保存学习者原始基线,不将“听说过”当作能力。
|
|
20
|
+
5. 写 `sources.md`:搜索范围、权威来源、source id、URL/定位、访问日期、支持的 claim、未决冲突和不确定性。项目事实、外部证据、类比和未知分开。
|
|
21
|
+
6. 创建 `INDEX.md`、`lessons/INDEX.md`、`homework/INDEX.md` 和 `learning-log.md`,运行 validator;完成后清空 `current_work`,不自动激活 L/H。
|
|
26
22
|
|
|
27
23
|
## 完成标准
|
|
28
24
|
|
|
29
|
-
-
|
|
30
|
-
-
|
|
31
|
-
-
|
|
32
|
-
- 已有知识来自精确 Markdown 文件,不来自索引摘要推测;
|
|
33
|
-
- rubric 没有因基线表现而降低目标;
|
|
34
|
-
- 所有输入、状态和下一路由可恢复。
|
|
25
|
+
- 每个 OBJ 有可观察证据、前置关系、Lesson 估时和来源计划;
|
|
26
|
+
- background 与 baseline 分离,所有原始回答保持不改写;
|
|
27
|
+
- 后续新问题写入 `notes/`,实质范围变化创建新 Lesson 或新 Change,并保留 revision。
|
|
35
28
|
|
|
36
|
-
##
|
|
29
|
+
## 子文件
|
|
37
30
|
|
|
38
31
|
- Change seed:`<Path>{roots.workflows}/learning/A-assess-and-plan/change-status-template.json</Path>`
|
|
39
|
-
-
|
|
32
|
+
- Course 模板:`<Path>{roots.workflows}/learning/A-assess-and-plan/course-template.md</Path>`
|
|
33
|
+
- Background 模板:`<Path>{roots.workflows}/learning/A-assess-and-plan/background-template.md</Path>`
|
|
@@ -1,28 +1,35 @@
|
|
|
1
1
|
{
|
|
2
|
-
"schema_version":
|
|
2
|
+
"schema_version": 2,
|
|
3
3
|
"artifact": "learning-change-status",
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
"
|
|
4
|
+
"change_id": "<YYYY-MM-DD-kebab-topic>",
|
|
5
|
+
"kind": "learning",
|
|
6
|
+
"domain": "<domain-id>",
|
|
7
|
+
"domain_type": "subject",
|
|
8
|
+
"topic_id": "<topic-id>",
|
|
9
|
+
"parent_change": null,
|
|
10
|
+
"root_change": "<YYYY-MM-DD-kebab-topic>",
|
|
11
|
+
"locator": "changes/<YYYY-MM-DD-kebab-topic>",
|
|
12
|
+
"lifecycle": "active",
|
|
13
|
+
"phase": "planning",
|
|
10
14
|
"current_work": "learning/assess-and-plan",
|
|
11
15
|
"works_run": [],
|
|
12
|
-
"created_at": "
|
|
13
|
-
"updated_at": "
|
|
14
|
-
"
|
|
16
|
+
"created_at": "<ISO-8601>",
|
|
17
|
+
"updated_at": "<ISO-8601>",
|
|
18
|
+
"closed_at": null,
|
|
15
19
|
"archived_at": null,
|
|
20
|
+
"closure_reason": null,
|
|
16
21
|
"archive_path": null,
|
|
22
|
+
"homework": {"status": "none", "latest_id": null, "submitted_at": null},
|
|
17
23
|
"mastery": {
|
|
24
|
+
"overall": "unverified",
|
|
18
25
|
"immediate": "not_attempted",
|
|
19
|
-
"retention": "
|
|
20
|
-
"
|
|
21
|
-
"
|
|
22
|
-
"transfer_passed": false,
|
|
26
|
+
"retention": "not_scheduled",
|
|
27
|
+
"critical_objectives": "not_attempted",
|
|
28
|
+
"transfer": "not_attempted",
|
|
23
29
|
"blocking_misconceptions": [],
|
|
24
30
|
"evidence": [],
|
|
25
31
|
"next_review_at": null
|
|
26
32
|
},
|
|
33
|
+
"children": [],
|
|
27
34
|
"blockers": []
|
|
28
35
|
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# 课程设计:<主题>
|
|
2
|
+
|
|
3
|
+
## 目标与期望效果
|
|
4
|
+
|
|
5
|
+
## 学习者与表达/深度配置
|
|
6
|
+
|
|
7
|
+
| 字段 | 值 |
|
|
8
|
+
| --- | --- |
|
|
9
|
+
| expression_level | `eli5` |
|
|
10
|
+
| coverage_depth | `standard` |
|
|
11
|
+
| Lesson 时长 | `35` 分钟 |
|
|
12
|
+
|
|
13
|
+
## 目标合同
|
|
14
|
+
|
|
15
|
+
| ID | 可观察目标 | 关键性 | 前置 OBJ | 证据类型 | Lesson | Homework |
|
|
16
|
+
| --- | --- | --- | --- | --- | --- | --- |
|
|
17
|
+
| OBJ-01 | `<能做什么>` | 是 | `<none>` | `<解释/应用/产出>` | L-001 | HW-001 |
|
|
18
|
+
|
|
19
|
+
## 课程地图
|
|
20
|
+
|
|
21
|
+
可按主题采用问题驱动、机制驱动、历史脉络、案例驱动或其他适合的结构;这里记录宏观路线和替代路线,不冻结每章模板。
|
|
22
|
+
|
|
23
|
+
## 成功证据与范围外
|
|
24
|
+
|
|
25
|
+
## Revision 记录
|
|
26
|
+
|
|
27
|
+
| 时间 | 变化 | 原因 | 是否重新生成 Lesson |
|
|
28
|
+
| --- | --- | --- | --- |
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: learning/consolidate
|
|
3
|
+
type: workflow-entry
|
|
4
|
+
workflow: learning
|
|
5
|
+
name: 主题整合
|
|
6
|
+
description: 将选定 Change 物理嵌入父 Change,生成带 claim 级 provenance 的可迭代主题综合。
|
|
7
|
+
keywords: [consolidate, synthesis, provenance, topic, relocate]
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# 主题整合
|
|
11
|
+
|
|
12
|
+
> 激活本 Work 后,先读取 `<Path>{roots.workflows}/learning/README.md</Path>`。
|
|
13
|
+
|
|
14
|
+
## 流程
|
|
15
|
+
|
|
16
|
+
1. 用户指定目标 domain/topic 和 source Change IDs。允许 active/closed 的未归档根 Change;已归档内容必须先显式恢复。已有综合子树只能整棵选择,不得拆分。
|
|
17
|
+
2. 读取每个 source 的 current locator、旧 locator、时间、内容哈希、Lesson/Homework/Review 索引和关系;若祖先/后代循环、重复 ID、活动锁或路径越界则阻塞。
|
|
18
|
+
3. 输出 dry-run:目标父 Change、子目录、effective date、移动清单、哈希、未掌握 evidence、冲突/空白和 context 写入计划。用户未确认前不移动、不改状态。
|
|
19
|
+
4. 用户确认后由 `<Path>{roots.workflows}/learning/common/tools/relocate-learning.mjs</Path>` 在父根锁内 stage、移动整个目录到 `children/<child-id>/`、更新 locations/status projection,并在失败时回滚。现有 Markdown 字节必须保持一致;子 owner 仍写自己的子目录,父负责路由和锁。
|
|
20
|
+
5. 生成 `synthesis/` 的 source-manifest、overview、claim-matrix、concept-map、conflicts-and-gaps 和带版本的 revisions。每个 claim 带 source Change/Lesson/Homework anchor、外部 source id、evidence status 和验证时间。
|
|
21
|
+
6. 用户再次确认后才发布 `context/domains/<domain>/topics/<topic-id>/`;发布不删除原料、不改变 immediate/retention 掌握结论。C 完成后不自动激活 A/R。
|
|
22
|
+
|
|
23
|
+
## 完成标准
|
|
24
|
+
|
|
25
|
+
- 物理移动可证明、可回滚、可由稳定 Change ID 解析;
|
|
26
|
+
- 原始工件不被综合覆盖,后续综合以新 revision 记录;
|
|
27
|
+
- active 子 Change 的后续 L/H 仍写子目录,不能绕过父根锁;
|
|
28
|
+
- synthesis 能明确支持、争议、未决 claim,并保留引用。
|
|
29
|
+
|
|
30
|
+
## 子文件
|
|
31
|
+
|
|
32
|
+
- 综合规则:`<Path>{roots.workflows}/learning/common/skills/topic-synthesis/SKILL.md</Path>`
|
|
33
|
+
- 迁移工具:`<Path>{roots.workflows}/learning/common/tools/relocate-learning.mjs</Path>`
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: learning/homework
|
|
3
|
+
type: workflow-entry
|
|
4
|
+
workflow: learning
|
|
5
|
+
name: 课程作业与评审
|
|
6
|
+
description: 以单一 Markdown 文件生成题目、接收显式提交并追加逐题评审;不与 Lesson 混写。
|
|
7
|
+
keywords: [homework, assignment, questions, grading, explain]
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# 课程作业与评审
|
|
11
|
+
|
|
12
|
+
> 激活本 Work 后,先读取 `<Path>{roots.workflows}/learning/README.md</Path>`。
|
|
13
|
+
|
|
14
|
+
## 流程
|
|
15
|
+
|
|
16
|
+
1. 用户指定一个或多个 Lesson/OBJ 和题数(默认 5)。读取课程正文、目标、来源和背景;不得把题目答案提前写入作业。
|
|
17
|
+
2. 创建 `homework/HW-<NNN>-<slug>-attempt-01.md`,写元数据、Q1…、空白 A1… 和 `Submission: pending`,更新 `homework/INDEX.md`。
|
|
18
|
+
3. 用户填写 A1…并在文件中加入精确行 `Submission: ready` 后再次激活 H。H 校验回答原文和提交标记,冻结问题/答案内容。
|
|
19
|
+
4. 只在同一文件末尾追加 `## Review`:每题给出 `correct|partial|incorrect|uncertain`、证据覆盖、中文详细讲解、`Explain (English)`、误区和下一步,并记录引用的 Lesson/source anchor。
|
|
20
|
+
5. 评审完成后更新 homework/immediate 投影;不写 mastered、不自动启动 R/C/A。重新作答必须创建新的 attempt 文件并链接旧 attempt,旧文件不可改写。
|
|
21
|
+
|
|
22
|
+
## 完成标准
|
|
23
|
+
|
|
24
|
+
- 一个作业文件包含问题、学习者答案、提交标记和 AI 评审;
|
|
25
|
+
- 评审不会改写学习者答案,答案不完整时按 evidence/uncertain 处理;
|
|
26
|
+
- H 的分类结论可结束当前学习轮次,R 才是延迟掌握证据。
|
|
27
|
+
|
|
28
|
+
## 子文件
|
|
29
|
+
|
|
30
|
+
- 作业模板:`<Path>{roots.workflows}/learning/H-homework/homework-template.md</Path>`
|
|
31
|
+
- 评审规则:`<Path>{roots.workflows}/learning/common/rules/assessment-policy.md</Path>`
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
---
|
|
2
|
+
homework_id: HW-<NNN>
|
|
3
|
+
attempt: 01
|
|
4
|
+
lesson_ids: [L-001]
|
|
5
|
+
objective_ids: [OBJ-01]
|
|
6
|
+
question_count: 5
|
|
7
|
+
created_at: <ISO-8601>
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# 作业:<课程标题>
|
|
11
|
+
|
|
12
|
+
## 引用课程
|
|
13
|
+
|
|
14
|
+
- Lesson:`<stable lesson id and current locator>`
|
|
15
|
+
- 目标:`<OBJ ids>`
|
|
16
|
+
|
|
17
|
+
## Questions
|
|
18
|
+
|
|
19
|
+
### Q1 — 回忆与定义
|
|
20
|
+
|
|
21
|
+
<问题>
|
|
22
|
+
|
|
23
|
+
### Q2 — 机制与为什么
|
|
24
|
+
|
|
25
|
+
<问题>
|
|
26
|
+
|
|
27
|
+
### Q3 — 变式应用
|
|
28
|
+
|
|
29
|
+
<问题>
|
|
30
|
+
|
|
31
|
+
### Q4 — 全新情境迁移
|
|
32
|
+
|
|
33
|
+
<问题>
|
|
34
|
+
|
|
35
|
+
### Q5 — 误区辨析
|
|
36
|
+
|
|
37
|
+
<问题>
|
|
38
|
+
|
|
39
|
+
## Learner Answers
|
|
40
|
+
|
|
41
|
+
### A1
|
|
42
|
+
|
|
43
|
+
<在此填写,不要改写 Q1>
|
|
44
|
+
|
|
45
|
+
### A2
|
|
46
|
+
|
|
47
|
+
<在此填写,不要改写 Q2>
|
|
48
|
+
|
|
49
|
+
### A3
|
|
50
|
+
|
|
51
|
+
<在此填写,不要改写 Q3>
|
|
52
|
+
|
|
53
|
+
### A4
|
|
54
|
+
|
|
55
|
+
<在此填写,不要改写 Q4>
|
|
56
|
+
|
|
57
|
+
### A5
|
|
58
|
+
|
|
59
|
+
<在此填写,不要改写 Q5>
|
|
60
|
+
|
|
61
|
+
Submission: pending
|
|
62
|
+
|
|
63
|
+
<!-- H 在 Submission: ready 后只能追加 Review;不得改写以上内容。 -->
|
|
@@ -3,34 +3,29 @@ id: learning/init-setup
|
|
|
3
3
|
type: workflow-entry
|
|
4
4
|
workflow: learning
|
|
5
5
|
name: 初始化学习系统
|
|
6
|
-
description:
|
|
7
|
-
keywords: [初始化, learner-profile, context
|
|
6
|
+
description: 初始化 Learning v2 的教学偏好、空索引、位置登记和可验证状态。
|
|
7
|
+
keywords: [初始化, learner-profile, context, learning-v2]
|
|
8
8
|
---
|
|
9
9
|
|
|
10
10
|
# 初始化学习系统
|
|
11
11
|
|
|
12
|
-
> 激活本 Work 后,先读取 `<Path>{roots.workflows}/learning/README.md</Path
|
|
13
|
-
|
|
14
|
-
本 Work 只建立恢复所需骨架。它不评估能力、不创建已掌握知识,也不把用户年龄写成领域水平。
|
|
12
|
+
> 激活本 Work 后,先读取 `<Path>{roots.workflows}/learning/README.md</Path>`。
|
|
15
13
|
|
|
16
14
|
## 流程
|
|
17
15
|
|
|
18
|
-
1. 读取 `<Path>{roots.state}/learning/status.json</Path
|
|
19
|
-
2. 读取 `<Path>{roots.workflows}/learning/I-init-setup/learner-profile-template.md</Path
|
|
20
|
-
3.
|
|
21
|
-
4.
|
|
22
|
-
5. 运行 `<Path>{roots.workflows}/learning/common/tools/validate-learning.mjs</Path>` 的 state 校验;重读所有新建文件。
|
|
23
|
-
6. 初始化不创建 change,也不写 `works_run`。返回 A-assess-and-plan 作为正常下一路由。
|
|
16
|
+
1. 读取 `<Path>{roots.state}/learning/status.json</Path>`。不存在时从 `_state/status.json` 原子创建;存在 v1 或未知 schema 时停止并返回 `learning-reset-required`,不修复旧文件。
|
|
17
|
+
2. 读取 `<Path>{roots.workflows}/learning/I-init-setup/learner-profile-template.md</Path>`。只询问无法从环境发现的语言、表达基线、深度、图像/图解偏好、默认 Lesson 时长、Homework 题数和 R 偏好;保留已有字段。
|
|
18
|
+
3. 创建 `changes/`、`archive/`、`context/domains/`,并初始化 `locations.json`、`context/INDEX.md`、`context/REVIEW.md`;不写任何知识条目。
|
|
19
|
+
4. 运行 `<Path>{roots.workflows}/learning/common/tools/validate-learning.mjs</Path>` 的 state 校验并重读新文件。
|
|
24
20
|
|
|
25
21
|
## 完成标准
|
|
26
22
|
|
|
27
|
-
-
|
|
28
|
-
-
|
|
29
|
-
-
|
|
30
|
-
- 没有新增 mastered 条目、active change 或外部副作用。
|
|
23
|
+
- 状态、位置登记和 profile 是合法 v2;
|
|
24
|
+
- 没有 active Change、mastered 条目或外部副作用;
|
|
25
|
+
- 空索引可导航,后续 Work 可恢复。
|
|
31
26
|
|
|
32
|
-
##
|
|
27
|
+
## 子文件
|
|
33
28
|
|
|
34
|
-
- Profile
|
|
35
|
-
-
|
|
36
|
-
-
|
|
29
|
+
- Profile:`<Path>{roots.workflows}/learning/I-init-setup/learner-profile-template.md</Path>`
|
|
30
|
+
- 总目录:`<Path>{roots.workflows}/learning/I-init-setup/context-index-template.md</Path>`
|
|
31
|
+
- 复习目录:`<Path>{roots.workflows}/learning/I-init-setup/review-index-template.md</Path>`
|
|
@@ -1,17 +1,19 @@
|
|
|
1
1
|
# 学习者偏好
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
本文件只记录表达和交互偏好;能力必须由 Lesson/Homework/Review 证据支持。
|
|
4
4
|
|
|
5
|
-
| 字段 |
|
|
5
|
+
| 字段 | 默认值或用户选择 |
|
|
6
6
|
| --- | --- |
|
|
7
7
|
| 交互语言 | `<待确认>` |
|
|
8
|
-
|
|
|
9
|
-
|
|
|
10
|
-
|
|
|
11
|
-
|
|
|
12
|
-
|
|
|
13
|
-
|
|
|
8
|
+
| expression_level | `eli5`(通俗但完整) |
|
|
9
|
+
| coverage_depth | `standard`;需要时 `deep` |
|
|
10
|
+
| 图解表示 | `ASCII + Markdown table + 可选 Mermaid/外链图片` |
|
|
11
|
+
| 图片无障碍 | 每个外链图片必须有 alt、caption、source、访问日期和文字等价物 |
|
|
12
|
+
| 标准 Lesson 时长 | `35` 分钟(允许 30–40) |
|
|
13
|
+
| 默认 Homework 题数 | `5` |
|
|
14
|
+
| R 保持复习 | 用户主动激活,默认不自动安排 |
|
|
15
|
+
| 复习间隔偏好 | `<待确认>` |
|
|
14
16
|
|
|
15
|
-
##
|
|
17
|
+
## 表达规则
|
|
16
18
|
|
|
17
|
-
|
|
19
|
+
ELI5 只改变词汇、句法、脚手架和类比比例,不删除技术事实、机制、边界、反例或来源。类比后必须说明失效处;外部媒体失效时仍能用文字和文本图理解课程。
|