create-ccc-tutor 0.1.0
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 +41 -0
- package/bin/cli.js +76 -0
- package/package.json +28 -0
- package/template/.claude/commands/abandon.md +7 -0
- package/template/.claude/commands/add-anti-flag.md +7 -0
- package/template/.claude/commands/add-constitution-clause.md +7 -0
- package/template/.claude/commands/audit-spec.md +7 -0
- package/template/.claude/commands/commit.md +7 -0
- package/template/.claude/commands/constitution-edit.md +7 -0
- package/template/.claude/commands/db-schema.md +7 -0
- package/template/.claude/commands/exam.md +66 -0
- package/template/.claude/commands/execution-plan.md +7 -0
- package/template/.claude/commands/feature-draft.md +7 -0
- package/template/.claude/commands/handoff.md +7 -0
- package/template/.claude/commands/implement.md +7 -0
- package/template/.claude/commands/init.md +7 -0
- package/template/.claude/commands/next.md +7 -0
- package/template/.claude/commands/offload.md +7 -0
- package/template/.claude/commands/pickup.md +7 -0
- package/template/.claude/commands/recall.md +7 -0
- package/template/.claude/commands/remember.md +7 -0
- package/template/.claude/commands/slide.md +87 -0
- package/template/.claude/commands/spec-finalize.md +7 -0
- package/template/.claude/commands/test-fix.md +7 -0
- package/template/.claude/commands/uninstall.md +7 -0
- package/template/.claude/settings.json +161 -0
- package/template/.claude-plugin/plugin.json +41 -0
- package/template/.codex/config.toml +24 -0
- package/template/.codex/hooks.json +4 -0
- package/template/.codex/install-skills.sh +18 -0
- package/template/.codex/skills/exam/SKILL.md +61 -0
- package/template/.codex/skills/slide/SKILL.md +69 -0
- package/template/.harness/agents/README.md +70 -0
- package/template/.harness/agents/_template/junior-agent-template.md +116 -0
- package/template/.harness/agents/backend-reviewer.md +153 -0
- package/template/.harness/agents/frontend-reviewer.md +158 -0
- package/template/.harness/agents/security-reviewer.md +148 -0
- package/template/.harness/agents/test-fixer.md +147 -0
- package/template/.harness/docs/doc-sync.md +29 -0
- package/template/.harness/docs/git-hygiene.md +56 -0
- package/template/.harness/docs/spec-model.md +47 -0
- package/template/.harness/docs/tool-map.md +120 -0
- package/template/.harness/docs/workflow.md +59 -0
- package/template/.harness/scripts/README.md +70 -0
- package/template/.harness/scripts/auditor-gate.sh +388 -0
- package/template/.harness/scripts/bootstrap-check.sh +103 -0
- package/template/.harness/scripts/budget-monitor.sh +223 -0
- package/template/.harness/scripts/check-prereqs.sh +165 -0
- package/template/.harness/scripts/checkpoint-recall.sh +136 -0
- package/template/.harness/scripts/checkpoint-write.sh +281 -0
- package/template/.harness/scripts/decision-log-append.sh +90 -0
- package/template/.harness/scripts/env-check.sh +286 -0
- package/template/.harness/scripts/format-edit.sh +80 -0
- package/template/.harness/scripts/lint-bans.sh +110 -0
- package/template/.harness/scripts/memory-archive.sh +129 -0
- package/template/.harness/scripts/memory-recall.sh +197 -0
- package/template/.harness/scripts/memory-snapshot.sh +124 -0
- package/template/.harness/scripts/post-migration.sh +58 -0
- package/template/.harness/scripts/precommit-cycles.sh +74 -0
- package/template/.harness/scripts/precommit-typecheck.sh +69 -0
- package/template/.harness/scripts/scratchpad-recall.sh +83 -0
- package/template/.harness/scripts/scratchpad-update.sh +39 -0
- package/template/.harness/scripts/standalone-bootstrap.md +443 -0
- package/template/.harness/skills/abandon/SKILL.md +157 -0
- package/template/.harness/skills/add-anti-flag/SKILL.md +205 -0
- package/template/.harness/skills/add-constitution-clause/SKILL.md +244 -0
- package/template/.harness/skills/audit-spec/SKILL.md +395 -0
- package/template/.harness/skills/commit/SKILL.md +270 -0
- package/template/.harness/skills/constitution-edit/SKILL.md +292 -0
- package/template/.harness/skills/db-schema/SKILL.md +145 -0
- package/template/.harness/skills/db-schema/references/methodology.md +202 -0
- package/template/.harness/skills/execution-plan/SKILL.md +346 -0
- package/template/.harness/skills/feature-draft/SKILL.md +426 -0
- package/template/.harness/skills/handoff/SKILL.md +211 -0
- package/template/.harness/skills/implement/SKILL.md +355 -0
- package/template/.harness/skills/init/SKILL.md +805 -0
- package/template/.harness/skills/next/SKILL.md +245 -0
- package/template/.harness/skills/offload/SKILL.md +134 -0
- package/template/.harness/skills/pickup/SKILL.md +213 -0
- package/template/.harness/skills/recall/SKILL.md +159 -0
- package/template/.harness/skills/remember/SKILL.md +205 -0
- package/template/.harness/skills/spec-finalize/SKILL.md +196 -0
- package/template/.harness/skills/test-fix/SKILL.md +363 -0
- package/template/.harness/skills/uninstall/SKILL.md +370 -0
- package/template/.harness/state/install.json +83 -0
- package/template/AGENTS.md +262 -0
- package/template/CCC_MAGI_LICENSE +201 -0
- package/template/CCC_MAGI_README.md +986 -0
- package/template/CLAUDE.md +658 -0
- package/template/codex.md +39 -0
- package/template/constitution.md +164 -0
- package/template/course/README.md +15 -0
- package/template/course/course_code(example)/exam/README.md +2 -0
- package/template/course/course_code(example)/slide/slide_example-1.pdf +40 -0
- package/template/course/course_code(example)/slide/slide_example-2.pdf +40 -0
- package/template/docs/features/slide-query-implementation.md +79 -0
- package/template/docs/features/slide-query.md +211 -0
- package/template/docs-harness/README.md +42 -0
- package/template/docs-harness/adoption-playbook.md +373 -0
- package/template/docs-harness/ccc-step1-driver-template.md +288 -0
- package/template/docs-harness/cli-configs-README.md +78 -0
- package/template/docs-harness/context-architecture-v2.md +249 -0
- package/template/docs-harness/design-spec.md +437 -0
- package/template/docs-harness/memory-layer.md +135 -0
- package/template/docs-harness/retrospective-notes.md +204 -0
- package/template/gitignore +106 -0
package/README.md
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# create-ccc-tutor
|
|
2
|
+
|
|
3
|
+
一行命令装好的**多科目 AI 复习助手**(基于 [CCC-MAGI](https://github.com/Ericcccccc777/CCC-MAGI) harness)。
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
cd /想要安装的目录
|
|
7
|
+
npx create-ccc-tutor@latest
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
装好后在该目录打开 Claude Code(或 Codex),告诉它科目 + 问题即可:
|
|
11
|
+
|
|
12
|
+
- **`/slide <问题>`** — 只依据当前科目 `course/<科目>/slide/` 里的课件回答,每条标出处、绝不编造;课件里没有时先如实告知,再问你要不要用外部知识补充(标注来源)。
|
|
13
|
+
- **`/exam <文件 + 第几题>`** — 在 `course/<科目>/exam/` 里定位题目并解答,解题依据优先引用课件。
|
|
14
|
+
|
|
15
|
+
## 目录结构
|
|
16
|
+
|
|
17
|
+
```
|
|
18
|
+
course/
|
|
19
|
+
<课程代码>/
|
|
20
|
+
slide/ ← 课件 PDF
|
|
21
|
+
exam/ ← 题目文件
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
`course/course_code(example)/` 是带两个示例课件的样板,复制改名即可开始。
|
|
25
|
+
|
|
26
|
+
## 选项
|
|
27
|
+
|
|
28
|
+
| 选项 | 作用 |
|
|
29
|
+
|---|---|
|
|
30
|
+
| `--dry-run` | 只预览要写哪些文件,不实际写入 |
|
|
31
|
+
| `--force` | 覆盖已存在的同名文件 |
|
|
32
|
+
|
|
33
|
+
## 要求
|
|
34
|
+
|
|
35
|
+
- Node.js ≥ 18
|
|
36
|
+
- Claude Code(必需)/ Codex(可选,用其技能需先 `bash .codex/install-skills.sh`)
|
|
37
|
+
- jq、git(harness hook 依赖)
|
|
38
|
+
|
|
39
|
+
## License
|
|
40
|
+
|
|
41
|
+
Apache-2.0。harness 部分版权归 CCC-MAGI 作者,详见随包的 `CCC_MAGI_LICENSE`。
|
package/bin/cli.js
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
const fs = require("fs");
|
|
4
|
+
const path = require("path");
|
|
5
|
+
|
|
6
|
+
const argv = process.argv.slice(2);
|
|
7
|
+
const dryRun = argv.includes("--dry-run");
|
|
8
|
+
const force = argv.includes("--force");
|
|
9
|
+
|
|
10
|
+
const SRC = path.join(__dirname, "..", "template");
|
|
11
|
+
const DEST = process.cwd();
|
|
12
|
+
|
|
13
|
+
// npm 发布时会吞掉名为 .gitignore 的文件,所以模板里存为 gitignore,落地时还原。
|
|
14
|
+
function destName(name) {
|
|
15
|
+
return name === "gitignore" ? ".gitignore" : name;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
let written = 0;
|
|
19
|
+
let skipped = 0;
|
|
20
|
+
|
|
21
|
+
function copyDir(src, dest) {
|
|
22
|
+
for (const entry of fs.readdirSync(src, { withFileTypes: true })) {
|
|
23
|
+
const s = path.join(src, entry.name);
|
|
24
|
+
const d = path.join(dest, destName(entry.name));
|
|
25
|
+
if (entry.isDirectory()) {
|
|
26
|
+
if (!dryRun) fs.mkdirSync(d, { recursive: true });
|
|
27
|
+
copyDir(s, d);
|
|
28
|
+
} else {
|
|
29
|
+
const rel = path.relative(DEST, d);
|
|
30
|
+
if (fs.existsSync(d) && !force) {
|
|
31
|
+
console.log(` 跳过(已存在,用 --force 覆盖): ${rel}`);
|
|
32
|
+
skipped++;
|
|
33
|
+
continue;
|
|
34
|
+
}
|
|
35
|
+
console.log(` ${dryRun ? "[预览] " : ""}写入: ${rel}`);
|
|
36
|
+
if (!dryRun) fs.copyFileSync(s, d);
|
|
37
|
+
written++;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
console.log(
|
|
43
|
+
`\nCCC-tutor 安装到: ${DEST}${dryRun ? " (--dry-run 预览,不写文件)" : ""}\n`
|
|
44
|
+
);
|
|
45
|
+
|
|
46
|
+
if (!fs.existsSync(SRC)) {
|
|
47
|
+
console.error("找不到 template/ 目录,包可能损坏。请重装 create-ccc-tutor。");
|
|
48
|
+
process.exit(1);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
copyDir(SRC, DEST);
|
|
52
|
+
|
|
53
|
+
// 给 shell 脚本加执行权限
|
|
54
|
+
if (!dryRun) {
|
|
55
|
+
const scriptsDir = path.join(DEST, ".harness", "scripts");
|
|
56
|
+
if (fs.existsSync(scriptsDir)) {
|
|
57
|
+
for (const f of fs.readdirSync(scriptsDir)) {
|
|
58
|
+
if (f.endsWith(".sh")) fs.chmodSync(path.join(scriptsDir, f), 0o755);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
const codexInstall = path.join(DEST, ".codex", "install-skills.sh");
|
|
62
|
+
if (fs.existsSync(codexInstall)) fs.chmodSync(codexInstall, 0o755);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
console.log(`
|
|
66
|
+
✓ 完成!写入 ${written} 个文件${skipped ? `,跳过 ${skipped} 个已存在文件(加 --force 覆盖)` : ""}。
|
|
67
|
+
|
|
68
|
+
接下来:
|
|
69
|
+
1. 把课件放进 course/<科目>/slide/ ,题目放进 course/<科目>/exam/
|
|
70
|
+
(course/course_code(example)/ 是带示例课件的样板,可复制改名)
|
|
71
|
+
2. 用 Codex 才需要: bash .codex/install-skills.sh
|
|
72
|
+
3. 打开 Claude Code: claude
|
|
73
|
+
直接说「科目 + 问题」,或用 /slide 查知识点、 /exam 解题目。
|
|
74
|
+
|
|
75
|
+
已预填 install.json,首次启动无需走 /init 配置。
|
|
76
|
+
`);
|
package/package.json
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "create-ccc-tutor",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "一行命令装好的多科目 AI 复习助手(基于 CCC-MAGI):slide 查课件、exam 解题目,严格依据课件、标出处、不编造。",
|
|
5
|
+
"bin": {
|
|
6
|
+
"create-ccc-tutor": "bin/cli.js"
|
|
7
|
+
},
|
|
8
|
+
"files": [
|
|
9
|
+
"bin/",
|
|
10
|
+
"template/"
|
|
11
|
+
],
|
|
12
|
+
"type": "commonjs",
|
|
13
|
+
"engines": {
|
|
14
|
+
"node": ">=18"
|
|
15
|
+
},
|
|
16
|
+
"keywords": [
|
|
17
|
+
"ccc-tutor",
|
|
18
|
+
"ai-tutor",
|
|
19
|
+
"claude-code",
|
|
20
|
+
"codex",
|
|
21
|
+
"slide",
|
|
22
|
+
"exam",
|
|
23
|
+
"course-review",
|
|
24
|
+
"ccc-magi"
|
|
25
|
+
],
|
|
26
|
+
"author": "",
|
|
27
|
+
"license": "Apache-2.0"
|
|
28
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Forwards to .harness/skills/abandon/SKILL.md. See that file for the full workflow.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
Read `.harness/skills/abandon/SKILL.md` and follow its workflow precisely. The user's argument (if any) is below — pass it to the skill as `$ARGUMENTS`.
|
|
6
|
+
|
|
7
|
+
$ARGUMENTS
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Forwards to .harness/skills/add-anti-flag/SKILL.md. See that file for the full workflow.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
Read `.harness/skills/add-anti-flag/SKILL.md` and follow its workflow precisely. The user's argument (if any) is below — pass it to the skill as `$ARGUMENTS`.
|
|
6
|
+
|
|
7
|
+
$ARGUMENTS
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Forwards to .harness/skills/add-constitution-clause/SKILL.md. See that file for the full workflow.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
Read `.harness/skills/add-constitution-clause/SKILL.md` and follow its workflow precisely. The user's argument (if any) is below — pass it to the skill as `$ARGUMENTS`.
|
|
6
|
+
|
|
7
|
+
$ARGUMENTS
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Forwards to .harness/skills/audit-spec/SKILL.md. See that file for the full workflow.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
Read `.harness/skills/audit-spec/SKILL.md` and follow its workflow precisely. The user's argument (if any) is below — pass it to the skill as `$ARGUMENTS`.
|
|
6
|
+
|
|
7
|
+
$ARGUMENTS
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Forwards to .harness/skills/commit/SKILL.md. See that file for the full workflow.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
Read `.harness/skills/commit/SKILL.md` and follow its workflow precisely. The user's argument (if any) is below — pass it to the skill as `$ARGUMENTS`.
|
|
6
|
+
|
|
7
|
+
$ARGUMENTS
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Forwards to .harness/skills/constitution-edit/SKILL.md. See that file for the full workflow.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
Read `.harness/skills/constitution-edit/SKILL.md` and follow its workflow precisely. The user's argument (if any) is below — pass it to the skill as `$ARGUMENTS`.
|
|
6
|
+
|
|
7
|
+
$ARGUMENTS
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Forwards to .harness/skills/db-schema/SKILL.md. See that file for the full workflow.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
Read `.harness/skills/db-schema/SKILL.md` and follow its workflow precisely. The user's argument (if any) is below — pass it to the skill as `$ARGUMENTS`.
|
|
6
|
+
|
|
7
|
+
$ARGUMENTS
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: 题目解答 — 在当前科目的 exam 文件夹里找到指定题目并解答,解题依据优先用课件
|
|
3
|
+
argument-hint: [科目] <文件名 + 第几题 / 题目描述>
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
你现在进入**题目解答模式(exam)**。用户的输入是:
|
|
7
|
+
|
|
8
|
+
$ARGUMENTS
|
|
9
|
+
|
|
10
|
+
# 你的任务
|
|
11
|
+
|
|
12
|
+
在当前科目 `course/<科目>/exam/` 文件夹里**找到用户指定的题目**,读出题目内容,然后**解答**。解题的知识依据**优先用同科目的 slide 课件**(看 `course/<科目>/slide/`),课件能支撑的步骤要标课件出处;课件查不到的部分,按下面铁律处理。
|
|
13
|
+
|
|
14
|
+
# 第零步:确定科目(多科目架构)
|
|
15
|
+
|
|
16
|
+
结构是 `course/<科目>/slide/`(课件)和 `course/<科目>/exam/`(题目)。
|
|
17
|
+
|
|
18
|
+
1. 用 Bash 列出科目:`ls -d course/*/ 2>/dev/null`。
|
|
19
|
+
2. 读 `.harness/state/current-subject.txt`(当前会话科目,可能不存在)。
|
|
20
|
+
3. 决定科目:
|
|
21
|
+
- 用户这次点名了科目 → 用它并写入 `.harness/state/current-subject.txt`。
|
|
22
|
+
- 没点名、state 有 → 沿用。
|
|
23
|
+
- 没点名、state 没有:只有一个科目 → 直接用并写入 state(开头说明"当前科目:X");多个科目 → **停下来问用户**是哪个科目,等回答。
|
|
24
|
+
- 用户说换科目 → 更新 state。
|
|
25
|
+
4. 之后只在 `course/<科目>/exam/` 里找题目,只在 `course/<科目>/slide/` 里找解题依据。
|
|
26
|
+
|
|
27
|
+
# 第一步:定位题目文件
|
|
28
|
+
|
|
29
|
+
1. 用 Bash 列出 `course/<科目>/exam/` 里的文件:`ls course/<科目>/exam/`。
|
|
30
|
+
- 文件夹为空 → 告诉用户"这个科目的 exam 文件夹里还没有题目文件,请先把文件放进 `course/<科目>/exam/`",停止。
|
|
31
|
+
2. 根据用户说的文件名匹配文件:
|
|
32
|
+
- 用户给了明确文件名(或足以唯一确定的关键词)→ 用那个文件。
|
|
33
|
+
- 文件名模糊、匹配到多个 → **列出候选**让用户确认,不要猜。
|
|
34
|
+
- 完全没说文件名、exam 里只有一个文件 → 用它。
|
|
35
|
+
- 没说文件名、有多个文件 → 列出文件请用户指定。
|
|
36
|
+
|
|
37
|
+
# 第二步:读出题目
|
|
38
|
+
|
|
39
|
+
用 Read 工具读该文件(PDF 用 `pages` 参数分段读,一次≤20 页;其他格式直接读)。
|
|
40
|
+
|
|
41
|
+
- 根据用户说的"第几题 / 哪道题 / 题目描述"定位到具体题目。
|
|
42
|
+
- 定位不到(题号超出、描述对不上)→ 告诉用户在该文件里没找到对应题目,并简要列出文件里实际有哪些题,请用户确认。
|
|
43
|
+
- **先把题目原文复述出来**给用户核对,再开始解答(确保找对了题)。
|
|
44
|
+
|
|
45
|
+
# 解题铁律(不可违反)
|
|
46
|
+
|
|
47
|
+
1. **先依据课件解。** 解题方法、公式、判定标准优先引用同科目 slide 课件,能引的步骤标出处 `(Lecture N, 第M页)`。
|
|
48
|
+
2. **课件没有的部分,如实说。** 某一步课件里查不到依据时,明确标"⚠️ 这一步课件没有直接依据,以下是通用解法/AI 补充,请自行核对",绝不假装是课件内容。
|
|
49
|
+
3. **不擅自改题、不擅自假设。** 题目说"另一批 / 不同对象"就不能当"同一批"。题目**内部自相矛盾**时(例如说不同对象却给出只有配对才算得出的差值数据),必须**明确指出矛盾**,把两种合理读法都列出来,绝不悄悄选一种当唯一答案。
|
|
50
|
+
4. **选方法看"设计"不看"数字"。** 选检验方法/步骤时,依据课件对适用条件的定义(数据**怎么收集**的——同一对象前后?还是两组不同对象?)判断,而不是因为题目给了某个数字就硬用。
|
|
51
|
+
- **设计与数字冲突时,以"设计"定主答案。** 例如题目说"another / 不同对象"却给了只有配对才算得出的差值标准差:**主答案按设计走**(不同对象 → 独立样本检验),把该差值标准差**标为"干扰项(与所述设计不符,不使用)"**;随后**附上**另一种读法的简要结果,提醒"本题题干自相矛盾,请以官方答案/老师要求为准"。**绝不因为"题目给了这个数字"就把配对当主答案**。
|
|
52
|
+
5. **没把握就说没把握。** 数值、步骤、出处不确定时如实标注,不假装精确。
|
|
53
|
+
|
|
54
|
+
# 第三步:组织解答
|
|
55
|
+
|
|
56
|
+
- 用**中文**解答,专有名词保留英文原词。
|
|
57
|
+
- 结构清晰:题目复述 → 解题思路(标明哪步靠课件、哪步是通用解法)→ 计算过程 → 最终答案。
|
|
58
|
+
- 每个用到课件的依据后标出处。
|
|
59
|
+
- 题目自相矛盾时按铁律 3/4 处理。
|
|
60
|
+
|
|
61
|
+
# 自检(解答前问自己)
|
|
62
|
+
|
|
63
|
+
- 我找对题了吗?复述的题目和用户要的是不是同一道?
|
|
64
|
+
- 能靠课件的步骤我标出处了吗?课件没有的步骤我标"非课件、请核对"了吗?
|
|
65
|
+
- 选检验方法时我是看"设计"还是被"数字"带着走了?
|
|
66
|
+
- 有没有擅自把矛盾题目当成单一读法?
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Forwards to .harness/skills/execution-plan/SKILL.md. See that file for the full workflow.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
Read `.harness/skills/execution-plan/SKILL.md` and follow its workflow precisely. The user's argument (if any) is below — pass it to the skill as `$ARGUMENTS`.
|
|
6
|
+
|
|
7
|
+
$ARGUMENTS
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Forwards to .harness/skills/feature-draft/SKILL.md. See that file for the full workflow.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
Read `.harness/skills/feature-draft/SKILL.md` and follow its workflow precisely. The user's argument (if any) is below — pass it to the skill as `$ARGUMENTS`.
|
|
6
|
+
|
|
7
|
+
$ARGUMENTS
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Forwards to .harness/skills/handoff/SKILL.md. See that file for the full workflow.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
Read `.harness/skills/handoff/SKILL.md` and follow its workflow precisely. The user's argument (if any) is below — pass it to the skill as `$ARGUMENTS`.
|
|
6
|
+
|
|
7
|
+
$ARGUMENTS
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Forwards to .harness/skills/implement/SKILL.md. See that file for the full workflow.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
Read `.harness/skills/implement/SKILL.md` and follow its workflow precisely. The user's argument (if any) is below — pass it to the skill as `$ARGUMENTS`.
|
|
6
|
+
|
|
7
|
+
$ARGUMENTS
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Forwards to .harness/skills/init/SKILL.md. See that file for the full workflow.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
Read `.harness/skills/init/SKILL.md` and follow its workflow precisely. The user's argument (if any) is below — pass it to the skill as `$ARGUMENTS`.
|
|
6
|
+
|
|
7
|
+
$ARGUMENTS
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Forwards to .harness/skills/next/SKILL.md. See that file for the full workflow.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
Read `.harness/skills/next/SKILL.md` and follow its workflow precisely. The user's argument (if any) is below — pass it to the skill as `$ARGUMENTS`.
|
|
6
|
+
|
|
7
|
+
$ARGUMENTS
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Forwards to .harness/skills/offload/SKILL.md. See that file for the full workflow.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
Read `.harness/skills/offload/SKILL.md` and follow its workflow precisely. The user's argument (if any) is below — pass it to the skill as `$ARGUMENTS`.
|
|
6
|
+
|
|
7
|
+
$ARGUMENTS
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Forwards to .harness/skills/pickup/SKILL.md. See that file for the full workflow.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
Read `.harness/skills/pickup/SKILL.md` and follow its workflow precisely. The user's argument (if any) is below — pass it to the skill as `$ARGUMENTS`.
|
|
6
|
+
|
|
7
|
+
$ARGUMENTS
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Forwards to .harness/skills/recall/SKILL.md. See that file for the full workflow.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
Read `.harness/skills/recall/SKILL.md` and follow its workflow precisely. The user's argument (if any) is below — pass it to the skill as `$ARGUMENTS`.
|
|
6
|
+
|
|
7
|
+
$ARGUMENTS
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Forwards to .harness/skills/remember/SKILL.md. See that file for the full workflow.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
Read `.harness/skills/remember/SKILL.md` and follow its workflow precisely. The user's argument (if any) is below — pass it to the skill as `$ARGUMENTS`.
|
|
6
|
+
|
|
7
|
+
$ARGUMENTS
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: 课件查询 — 在当前科目的 slide 课件里找答案,每条标出处,绝不编造;课件没有时先问再补充
|
|
3
|
+
argument-hint: [科目] <你的问题>
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
你现在进入**课件查询模式(slide)**。用户的输入是:
|
|
7
|
+
|
|
8
|
+
$ARGUMENTS
|
|
9
|
+
|
|
10
|
+
# 你的任务
|
|
11
|
+
|
|
12
|
+
只依据当前科目 `course/<科目>/slide/` 文件夹里的 PDF 课件来回答问题。这是一个**严格依据来源、绝不编造**的复习问答工具,用户用它来复习,必须能信任每一句话都能追溯到课件。课件永远是一手资料。
|
|
13
|
+
|
|
14
|
+
# 第零步:确定科目(多科目架构)
|
|
15
|
+
|
|
16
|
+
本项目支持多个科目。结构是 `course/<科目>/slide/`(课件)和 `course/<科目>/exam/`(题目)。
|
|
17
|
+
|
|
18
|
+
1. 用 Bash 列出有哪些科目:`ls -d course/*/ 2>/dev/null`。
|
|
19
|
+
2. 当前会话科目记在 `.harness/state/current-subject.txt`(可能不存在)。先读它。
|
|
20
|
+
3. 决定本次用哪个科目:
|
|
21
|
+
- **用户这次输入里点名了某个科目**(文字里出现某个科目文件夹名,如 `course_code(example)`、`course_code(example)`,或明显对应的说法)→ 用它,并把它写进 `.harness/state/current-subject.txt`(覆盖)。
|
|
22
|
+
- **没点名、但 state 文件里有当前科目** → 沿用该科目,不必再问。
|
|
23
|
+
- **没点名、state 也没有**:
|
|
24
|
+
- 如果 `course/` 下**只有一个科目** → 直接用它,并写入 state,回答开头一句话说明"当前科目:X"。
|
|
25
|
+
- 如果**有多个科目** → **停下来问用户**这次是哪个科目(列出可选科目),等用户回答后再继续。不要猜。
|
|
26
|
+
- **用户明确说要换科目** → 更新 state 为新科目。
|
|
27
|
+
4. 确定科目后,本次所有查找都只在 `course/<科目>/slide/` 里进行。
|
|
28
|
+
|
|
29
|
+
# 铁律(不可违反)
|
|
30
|
+
|
|
31
|
+
1. **只用课件内容回答(默认)。** 默认绝不使用课件之外的知识、常识或训练记忆去补充、推断或"完善"答案。**唯一例外**见铁律 2 的"情况 E"——且必须先征得用户同意、并明确标注。
|
|
32
|
+
2. **找不到就如实说,先问再补充。** 如果当前科目的 slide 课件里没有答案,**先明确告诉用户"课件里没有这个内容"**,然后**问用户**要不要用课件之外(网上/AI 已知)的知识补充。**只有用户同意后**才补充,且补充内容必须整段标注"⚠️ 非课件内容、来自外部,请自行核对"(若联网搜到,附来源链接)。绝不在用户没同意前就编一个看似合理的答案。
|
|
33
|
+
3. **每个课件说法都要标出处。** 格式形如 `(Lecture 9, 第13页)`。多个来源就分别标。
|
|
34
|
+
4. **没把握就说没把握。** 出处(讲次或页码)不确定时,明确标"出处不确定",绝不假装精确。
|
|
35
|
+
5. **不擅自改题、不擅自假设。** 题目说"另一批 / 不同对象"就不能当成"同一批"。如果题目**内部自相矛盾**(例如说是不同对象、却又给出只有"配对/同一批"才算得出的差值数据),必须**明确指出矛盾**,并把两种合理读法都列出来,绝不悄悄选一种当成唯一答案。
|
|
36
|
+
6. **选方法看"设计"不看"数字"。** 当题目要求选择检验方法 / 步骤时,依据课件对适用条件的定义(数据是**怎么收集**的——同一对象前后?还是两组不同对象?)来判断,而不是因为题目给了某个数字就硬用它。课件里有判定标准的(如独立样本 vs 配对样本的定义),引用出来。
|
|
37
|
+
- **设计与数字冲突时,以"设计"定主答案。** 例如题目说"another / 不同对象"却又给了只有配对才算得出的差值标准差:**主答案必须按设计走**(不同对象 → 独立样本检验),并把那个差值标准差**明确标为"干扰项(与所述设计不符,不使用)"**;随后**附上**另一种读法的简要结果,并提醒"本题题干自相矛盾,请以官方答案/老师要求为准"。**绝不能因为"题目给了这个数字"就把配对当主答案**——那正是这类题要考的陷阱。
|
|
38
|
+
|
|
39
|
+
# 第一步:检查输入
|
|
40
|
+
|
|
41
|
+
- 如果除了科目外没有具体问题(例如只输入了 `/slide` 或只说了科目名)→ 友好地请用户写上想问的问题,然后停止。
|
|
42
|
+
- 如果问题太宽泛、太模糊、或依赖上文(例如"上一个概念有什么例子"——本命令不记得上文)→ **不要猜用户想问什么**,请用户把问题说完整。可以同时给出明确标注的相关内容,但要说清"这是相关内容、非直接回答"。
|
|
43
|
+
|
|
44
|
+
# 第二步:检查课件
|
|
45
|
+
|
|
46
|
+
用 Bash 或 Glob 列出当前科目 `course/<科目>/slide/` 文件夹里的 PDF 文件。
|
|
47
|
+
|
|
48
|
+
- 如果文件夹是空的、没有任何 PDF → 告诉用户"这个科目的 slide 文件夹里还没有课件,请先把 PDF 放进 `course/<科目>/slide/`",然后停止。
|
|
49
|
+
|
|
50
|
+
> 课件的讲次按文件名里的 "Lecture N" 推断;文件名没写清讲次的,读 PDF 内部标题判断;还是不确定就用"文件名 + 页码"标注并说明讲次不确定。
|
|
51
|
+
|
|
52
|
+
# 第三步:找答案
|
|
53
|
+
|
|
54
|
+
1. 根据问题主题,判断最可能相关的是哪一讲(看文件名/主题)。
|
|
55
|
+
2. 用 Read 工具读相关 PDF。PDF 较大、页数多,**必须用 `pages` 参数分段读**(一次最多 20 页),按需翻页找到相关内容。
|
|
56
|
+
3. 如果一讲里没找到,再扩大到主题相邻的其他讲。
|
|
57
|
+
4. 记下答案所在的**确切文件名和页码**,用于标注出处。
|
|
58
|
+
|
|
59
|
+
# 第四步:组织回答
|
|
60
|
+
|
|
61
|
+
根据找到的情况,按下面的规则回答:
|
|
62
|
+
|
|
63
|
+
**情况 A — 找到了直接答案:**
|
|
64
|
+
- 用**中文**回答。专有名词保留英文原词,例如"置信区间(confidence interval)"。
|
|
65
|
+
- 附上**课件里的原文片段**(引用原话),方便用户核对。
|
|
66
|
+
- 每个关键说法后标注出处,例如 `(Lecture 9, 第13页)`。
|
|
67
|
+
|
|
68
|
+
**情况 B — 答案分散在多个课件:** 综合成连贯回答,但每一部分分别标各自出处。
|
|
69
|
+
|
|
70
|
+
**情况 C — 多个课件说法互相矛盾:** 不替用户裁决、也不强行合并。分别如实列出每份课件的说法和出处,并指出"这两处课件说法不一致"。
|
|
71
|
+
|
|
72
|
+
**情况 D — 只有相关、但非直接答案的内容:** 给出相关内容,明确标注"⚠️ 这是相关内容,课件里没有直接回答你这个问题",并给出出处。
|
|
73
|
+
|
|
74
|
+
**情况 E — 课件里完全找不到(先问再补充):**
|
|
75
|
+
1. 先明确说"当前科目的课件里没有这个内容"(不编造)。若有课件读不出来——扫描图片/加密/损坏——措辞收紧为"在**能读取的**课件里没找到;文件 xxx 没读出来、未纳入判断"。
|
|
76
|
+
2. 然后**问用户**:"要不要我用课件之外的知识(联网搜索 / 我已知的知识)补充一下?"——**停下来等用户回答**。
|
|
77
|
+
3. 用户同意后:优先用 WebSearch 联网搜索,给出答案并附**来源链接**;整段开头标注"⚠️ 以下非课件内容、来自外部,请自行核对"。联网不可用时用 AI 已知知识,同样整段标注"⚠️ 非课件内容、AI 补充、可能不是最新,请自行核对"。
|
|
78
|
+
4. 用户不要补充 → 到此为止。
|
|
79
|
+
|
|
80
|
+
**情况 F — 某个 PDF 读不出文字:** 告诉用户"文件 xxx 读不出文字内容(可能是扫描图片),未纳入这次查询",并基于其余能读的课件继续回答。
|
|
81
|
+
|
|
82
|
+
# 自检(回答前问自己)
|
|
83
|
+
|
|
84
|
+
- 课件部分我说的每句关键内容,是不是都来自课件、都有出处?
|
|
85
|
+
- 有没有哪句是我"自己知道"但课件里其实没有、却没标注为外部补充的?如果有 → 删掉或按情况 E 处理。
|
|
86
|
+
- 我有没有在用户没同意前就擅自用外部知识补充?
|
|
87
|
+
- 出处的讲次和页码,我有把握吗?没把握有没有如实标注"不确定"?
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Forwards to .harness/skills/spec-finalize/SKILL.md. See that file for the full workflow.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
Read `.harness/skills/spec-finalize/SKILL.md` and follow its workflow precisely. The user's argument (if any) is below — pass it to the skill as `$ARGUMENTS`.
|
|
6
|
+
|
|
7
|
+
$ARGUMENTS
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Forwards to .harness/skills/test-fix/SKILL.md. See that file for the full workflow.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
Read `.harness/skills/test-fix/SKILL.md` and follow its workflow precisely. The user's argument (if any) is below — pass it to the skill as `$ARGUMENTS`.
|
|
6
|
+
|
|
7
|
+
$ARGUMENTS
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Forwards to .harness/skills/uninstall/SKILL.md. See that file for the full workflow.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
Read `.harness/skills/uninstall/SKILL.md` and follow its workflow precisely. The user's argument (if any) is below — pass it to the skill as `$ARGUMENTS`.
|
|
6
|
+
|
|
7
|
+
$ARGUMENTS
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
{
|
|
2
|
+
"_comment_top": "Claude Code settings — rendered from outcome/cli-configs/claude/settings.json at /init. See sibling README.md for what each section does.",
|
|
3
|
+
|
|
4
|
+
"_comment_context_management": "Anthropic Context Editing (beta 2025-06-27). Server-side clears stale Read/Bash/Grep tool outputs from context while preserving the decisions to call them. This is the single highest-ROI context-saving mechanism in CCC-MAGI's v2 context architecture — see docs-harness/context-architecture-v2.md § Phase 0.",
|
|
5
|
+
"betas": ["context-management-2025-06-27"],
|
|
6
|
+
"context_management": {
|
|
7
|
+
"clear_tool_uses": true
|
|
8
|
+
},
|
|
9
|
+
|
|
10
|
+
"_comment_env": "CCC_CONTEXT_BUDGET overrides the budget-monitor.sh context-size detection. Set to 1000000 because this project runs Opus 4.8 on the 1M extended-context tier, but the transcript's model field ('claude-opus-4-8' without the [1m] suffix) makes auto-detection fall back to the 200k standard tier. Explicit override keeps budget warnings accurate.",
|
|
11
|
+
"env": {
|
|
12
|
+
"CCC_CONTEXT_BUDGET": "1000000"
|
|
13
|
+
},
|
|
14
|
+
|
|
15
|
+
"permissions": {
|
|
16
|
+
"_comment": "MCP tool calls allowed without prompting. Default = context7 only. Add project-specific MCPs (backend MCP, GitHub MCP, etc.) at /init or by hand-editing this file.",
|
|
17
|
+
"allow": [
|
|
18
|
+
"mcp__context7__query-docs",
|
|
19
|
+
"mcp__context7__resolve-library-id"
|
|
20
|
+
]
|
|
21
|
+
},
|
|
22
|
+
|
|
23
|
+
"hooks": {
|
|
24
|
+
"_comment": "All hook scripts referenced below should live at $CLAUDE_PROJECT_DIR/.harness/scripts/. The harness ships templates; /init copies them and the user customizes each for the project's stack.",
|
|
25
|
+
|
|
26
|
+
"UserPromptSubmit": [
|
|
27
|
+
{
|
|
28
|
+
"_comment": "Bootstrap gate: fires on EVERY user prompt. If .harness/state/install.json is missing (harness installed but not yet configured), injects a directive telling Claude to read standalone-bootstrap.md and run the bootstrap flow BEFORE responding to the user. Once install.json exists, this hook exits silently. Critical for the harness's 'self-bootstrap on first interaction' design.",
|
|
29
|
+
"hooks": [
|
|
30
|
+
{
|
|
31
|
+
"type": "command",
|
|
32
|
+
"command": "\"$CLAUDE_PROJECT_DIR\"/.harness/scripts/bootstrap-check.sh",
|
|
33
|
+
"timeout": 10
|
|
34
|
+
}
|
|
35
|
+
]
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"_comment": "Budget pressure monitor (P1.6): fires on every user prompt. Reads transcript size, emits advisory additionalContext at 50%/75%/90% thresholds instructing Claude to prefer cheaper models / skip Explore subagents / recommend /compact. Silent under 50%. Configurable via CCC_CONTEXT_BUDGET env var (default 200000).",
|
|
39
|
+
"hooks": [
|
|
40
|
+
{
|
|
41
|
+
"type": "command",
|
|
42
|
+
"command": "\"$CLAUDE_PROJECT_DIR\"/.harness/scripts/budget-monitor.sh",
|
|
43
|
+
"timeout": 5
|
|
44
|
+
}
|
|
45
|
+
]
|
|
46
|
+
}
|
|
47
|
+
],
|
|
48
|
+
|
|
49
|
+
"PreToolUse": [
|
|
50
|
+
{
|
|
51
|
+
"_comment": "Pre-commit gate: typecheck + lint-bans + cycles. Matcher constrains to Bash calls; each script self-filters to `git commit` invocations via stdin parsing (settings.json `if` clause was found not to be honored consistently — see harness-testing-2026-05-25.md § P0.Z).",
|
|
52
|
+
"matcher": "Bash",
|
|
53
|
+
"hooks": [
|
|
54
|
+
{
|
|
55
|
+
"type": "command",
|
|
56
|
+
"command": "\"$CLAUDE_PROJECT_DIR\"/.harness/scripts/precommit-typecheck.sh",
|
|
57
|
+
"timeout": 120,
|
|
58
|
+
"statusMessage": "Running typecheck before commit..."
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"type": "command",
|
|
62
|
+
"command": "\"$CLAUDE_PROJECT_DIR\"/.harness/scripts/lint-bans.sh",
|
|
63
|
+
"timeout": 30,
|
|
64
|
+
"statusMessage": "Scanning for anti-flag patterns before commit..."
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"type": "command",
|
|
68
|
+
"_comment": "Cycles check is only meaningful if `dependency_flow` slot is non-empty. /init removes this entry on projects that opt out.",
|
|
69
|
+
"command": "\"$CLAUDE_PROJECT_DIR\"/.harness/scripts/precommit-cycles.sh",
|
|
70
|
+
"timeout": 60,
|
|
71
|
+
"statusMessage": "Checking for dependency cycles..."
|
|
72
|
+
}
|
|
73
|
+
]
|
|
74
|
+
}
|
|
75
|
+
],
|
|
76
|
+
|
|
77
|
+
"PostToolUse": [
|
|
78
|
+
{
|
|
79
|
+
"_comment": "Run formatter on every Edit/Write. The format-edit.sh script picks the right formatter based on file extension.",
|
|
80
|
+
"matcher": "Edit|Write",
|
|
81
|
+
"hooks": [
|
|
82
|
+
{
|
|
83
|
+
"type": "command",
|
|
84
|
+
"command": "\"$CLAUDE_PROJECT_DIR\"/.harness/scripts/format-edit.sh",
|
|
85
|
+
"timeout": 30,
|
|
86
|
+
"statusMessage": "Running formatter..."
|
|
87
|
+
}
|
|
88
|
+
]
|
|
89
|
+
}
|
|
90
|
+
],
|
|
91
|
+
|
|
92
|
+
"SessionStart": [
|
|
93
|
+
{
|
|
94
|
+
"_comment": "Memory archive (v2 Phase 2): migrates recall-tier entries older than CCC_ARCHIVE_AGE_DAYS (default 30) into archive/<YYYY-MM>.jsonl. Runs FIRST so memory-recall reads a freshly-pruned recall tier. Also back-fills `id` on legacy v1 entries.",
|
|
95
|
+
"hooks": [
|
|
96
|
+
{
|
|
97
|
+
"type": "command",
|
|
98
|
+
"command": "\"$CLAUDE_PROJECT_DIR\"/.harness/scripts/memory-archive.sh",
|
|
99
|
+
"timeout": 10
|
|
100
|
+
}
|
|
101
|
+
]
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
"_comment": "Memory recall v2 (manifest mode): injects ONLY index lines (one per entry, ~80 tokens) for the recall tier. AI fetches bodies on-demand via /recall <id>. ~70% token savings vs v1 eager-injection. See docs-harness/context-architecture-v2.md § Phase 2.",
|
|
105
|
+
"hooks": [
|
|
106
|
+
{
|
|
107
|
+
"type": "command",
|
|
108
|
+
"command": "\"$CLAUDE_PROJECT_DIR\"/.harness/scripts/memory-recall.sh",
|
|
109
|
+
"timeout": 10
|
|
110
|
+
}
|
|
111
|
+
]
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
"_comment": "Scratchpad recall (v2 Phase 4): reads .harness/state/scratchpad.md and injects as additionalContext. Working-memory tier — always loaded.",
|
|
115
|
+
"hooks": [
|
|
116
|
+
{
|
|
117
|
+
"type": "command",
|
|
118
|
+
"command": "\"$CLAUDE_PROJECT_DIR\"/.harness/scripts/scratchpad-recall.sh",
|
|
119
|
+
"timeout": 5
|
|
120
|
+
}
|
|
121
|
+
]
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
"_comment": "Checkpoint recall: detects current git branch's feature, reads .harness/state/workflow-checkpoints/<feature>.json if it exists, injects additionalContext telling MAGI Core to surface the resume offer to the user.",
|
|
125
|
+
"hooks": [
|
|
126
|
+
{
|
|
127
|
+
"type": "command",
|
|
128
|
+
"command": "\"$CLAUDE_PROJECT_DIR\"/.harness/scripts/checkpoint-recall.sh",
|
|
129
|
+
"timeout": 5
|
|
130
|
+
}
|
|
131
|
+
]
|
|
132
|
+
}
|
|
133
|
+
],
|
|
134
|
+
|
|
135
|
+
"Stop": [
|
|
136
|
+
{
|
|
137
|
+
"_comment": "Scratchpad update (v2 Phase 4): fires at end of each AI turn. Instructs AI to rewrite .harness/state/scratchpad.md with current objective / last step / next step / blockers. Manus-style recitation bias against context distraction.",
|
|
138
|
+
"hooks": [
|
|
139
|
+
{
|
|
140
|
+
"type": "command",
|
|
141
|
+
"command": "\"$CLAUDE_PROJECT_DIR\"/.harness/scripts/scratchpad-update.sh",
|
|
142
|
+
"timeout": 5
|
|
143
|
+
}
|
|
144
|
+
]
|
|
145
|
+
}
|
|
146
|
+
],
|
|
147
|
+
|
|
148
|
+
"PreCompaction": [
|
|
149
|
+
{
|
|
150
|
+
"_comment": "Memory snapshot: prompts Claude (via additionalContext) to summarize the session's key decisions into .harness/memory/observations.jsonl BEFORE context compaction proceeds. Claude does the summarization; the hook just orchestrates the prompt.",
|
|
151
|
+
"hooks": [
|
|
152
|
+
{
|
|
153
|
+
"type": "command",
|
|
154
|
+
"command": "\"$CLAUDE_PROJECT_DIR\"/.harness/scripts/memory-snapshot.sh",
|
|
155
|
+
"timeout": 10
|
|
156
|
+
}
|
|
157
|
+
]
|
|
158
|
+
}
|
|
159
|
+
]
|
|
160
|
+
}
|
|
161
|
+
}
|