harnessed 4.41.0 → 4.43.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.
@@ -6,44 +6,36 @@
6
6
  schema_version: harnessed.discipline.v1
7
7
  discipline: karpathy
8
8
  enforcement_layer: code-writing
9
- auto_enforce: true
10
9
 
11
10
  rules:
12
11
  - id: think-before-coding
13
12
  description: 先思考后写代码,不直接 dump 代码;每个子任务前 brainstorm 设计意图
14
13
  enforcement: warn
15
14
  trigger: subtask.type == 'code-write'
16
- check_method: heuristic
17
- # check_method='heuristic' — runtime engine 检查 subagent 输出 first 200 char 是否含设计意图 marker
15
+ # runtime engine 检查 subagent 输出 first 200 char 是否含设计意图 marker
18
16
  # (e.g., 'Plan:' / 'Approach:' / '设计:' / '思路:'),若全是 code block → warn
19
17
 
20
18
  - id: simplicity-first
21
19
  description: 追求最小有效代码,避免不必要复杂度;YAGNI / 不为假设场景写代码
22
20
  enforcement: warn
23
21
  trigger: always-on
24
- check_method: llm-judge
25
- # check_method='llm-judge' — verify phase 调用 code-simplifier review
22
+ # verify phase 调用 code-simplifier review
26
23
 
27
24
  - id: surgical-changes
28
25
  description: 小步原子修改,每个 commit 单一职责;不大段重写
29
26
  enforcement: warn
30
27
  trigger: phase.type == 'execute'
31
- check_method: external-cmd
32
- auto_fix_cmd: 'git diff --stat HEAD~1 | awk ''{lines+=$3} END {if (lines>300) exit 1}'''
33
28
  # 单 commit > 300 line diff → warn (rough heuristic, override allowed via task spec)
34
29
 
35
30
  - id: goal-driven-execution
36
31
  description: 目标驱动,不发散 / 不无关重构;只解决当前任务 + 不夹带 cleanup
37
32
  enforcement: warn
38
33
  trigger: phase.type == 'execute'
39
- check_method: heuristic
40
34
 
41
35
  - id: file-length-200-hard-limit
42
36
  description: 单文件 ≤200L 硬限 (per project CLAUDE.md karpathy 心法 reminder);超过 → split helper
43
37
  enforcement: halt
44
38
  trigger: phase.type == 'execute' AND file.lines > 200
45
- check_method: external-cmd
46
- auto_fix_cmd: 'wc -l <file> | awk ''{if ($1>200) exit 1}'''
47
39
  # 实装 split helper pattern (sister fallbackHandlers.ts / sdkReconcile.ts ≤80L)
48
40
 
49
41
  # ── T2.7 (4.34.x) — capability description 自 v2.0 起就在声称、但一直没有规则
@@ -55,7 +47,6 @@ rules:
55
47
  description: 信任内部代码 —— 只在信任边界(外部输入 / 解析后的配置 / 用户数据)做校验,不在每一层内部调用上重复防御;不给自己控制的调用点加冗余断言
56
48
  enforcement: warn
57
49
  trigger: subtask.type == 'code-write'
58
- check_method: heuristic
59
50
  # sister role-prompts.zh-Hans.yaml task-code checklist「信任内部代码:不在每层
60
51
  # 重复校验已经检查过的输入」
61
52
 
@@ -63,8 +54,7 @@ rules:
63
54
  description: 注释解释 WHY 不解释 WHAT —— 删掉复述代码的注释、以及已经与代码脱节的注释;一条注释必须补上代码本身承载不了的信息(设计理由 / 约束 / 上游出处)
64
55
  enforcement: warn
65
56
  trigger: subtask.type == 'code-write'
66
- check_method: llm-judge
67
- # check_method='llm-judge' — sister simplicity-first:由 verify 阶段的
57
+ # sister simplicity-first:由 verify 阶段的
68
58
  # code-simplifier review 承接(role-prompts.zh-Hans.yaml verify-simplify
69
59
  # checklist「撒谎或重复代码的注释 → 删」)。
70
60
  #
@@ -6,7 +6,6 @@
6
6
  schema_version: harnessed.discipline.v1
7
7
  discipline: language
8
8
  enforcement_layer: output
9
- auto_enforce: true
10
9
 
11
10
  rules:
12
11
  - id: follow-user-language
@@ -20,7 +19,6 @@ rules:
20
19
  stay consistent with CLI tone.
21
20
  enforcement: info
22
21
  trigger: every Claude response
23
- check_method: read env.HARNESSED_USER_LANG, validate output lang matches
24
22
 
25
23
  # The 8 categories are DATA, not a comment: src/cli/prompt.ts buildLanguageSection
26
24
  # parses the numbered lines below and renders them into the spawn prompt's
@@ -40,7 +38,6 @@ rules:
40
38
  8. Quoted material — documents, errors, config examples, the user's own words — reproduced verbatim, with any explanation kept outside the quote
41
39
  enforcement: warn
42
40
  trigger: always-on
43
- check_method: heuristic
44
41
 
45
42
  - id: cross-cultural-humor
46
43
  description: |-
@@ -51,7 +48,6 @@ rules:
51
48
  — same concept, different cultural anchor. Avoid forced calques.
52
49
  enforcement: info
53
50
  trigger: humor_or_idiom_present
54
- check_method: heuristic
55
51
 
56
52
  - id: lang-request-override
57
53
  description: |-
@@ -60,4 +56,3 @@ rules:
60
56
  target language regardless of env.HARNESSED_USER_LANG.
61
57
  enforcement: info
62
58
  trigger: user.lang_request != null
63
- check_method: regex
@@ -7,19 +7,15 @@
7
7
  schema_version: harnessed.discipline.v1
8
8
  discipline: operational
9
9
  enforcement_layer: commit
10
- auto_enforce: true
11
10
 
12
11
  rules:
13
12
  - id: biome-preempt
14
13
  description: |
15
14
  Before any TS/JS commit you must run `pnpm exec biome check --write` (3 CI-red recurrences Phase 2.1.1/2.2/2.3 project memory)
16
- enforcement: auto-fix
15
+ enforcement: warn
17
16
  trigger: |
18
17
  phase.type == 'commit' AND
19
18
  changed_files matches '\\.(ts|tsx|js|mjs)$'
20
- check_method: external-cmd
21
- auto_fix_cmd: 'corepack pnpm exec biome check --write'
22
- # NEW src/discipline/enforcement/before-commit.ts hook; exit 0 才允许 commit
23
19
 
24
20
  - id: a7-adr-conservation
25
21
  description: |
@@ -27,15 +23,12 @@ rules:
27
23
  (sister Phase 1.3-2.6 ADR errata path)
28
24
  enforcement: warn
29
25
  trigger: phase.type == 'commit' AND changed_files contains 'docs/adr/'
30
- check_method: external-cmd
31
- auto_fix_cmd: 'scripts/check-adr-conservation.sh'
32
26
 
33
27
  - id: no-push-without-approval
34
28
  description: |
35
29
  NEVER push to remote without user explicit approval (project CLAUDE.md commit safety)
36
30
  enforcement: halt
37
31
  trigger: cmd.type == 'git-push'
38
- check_method: external-cmd
39
32
  # completion-gate loop / subagent 自动调 git push → halt;user explicit `git push` 在主 session 允许
40
33
 
41
34
  - id: no-skip-hooks
@@ -43,14 +36,12 @@ rules:
43
36
  Skip-hook flags such as --no-verify / --no-gpg-sign are not allowed, unless the user explicitly requests them
44
37
  enforcement: halt
45
38
  trigger: cmd.type == 'git-commit' AND args contains '--no-verify'
46
- check_method: regex
47
39
 
48
40
  - id: destructive-ops-explicit
49
41
  description: |
50
42
  Destructive ops (git reset --hard / push --force / rm -rf / drop table) require explicit user confirmation
51
43
  enforcement: halt
52
44
  trigger: cmd.is_destructive == true
53
- check_method: heuristic
54
45
  # heuristic — 命令含 'rm -rf' / 'reset --hard' / '--force' / 'DROP TABLE' / 'delete from'
55
46
 
56
47
  - id: authorization-not-transitive
@@ -58,7 +49,6 @@ rules:
58
49
  A user approving one push ≠ approval for the whole session; each destructive / shared-state operation needs separate confirmation
59
50
  enforcement: warn
60
51
  trigger: cmd.requires_approval == true AND session.has_prior_approval == true
61
- check_method: heuristic
62
52
 
63
53
  # v3.6.0 Phase 3 — transparent-skip discipline (P0b 下半,Audit § fallback
64
54
  # 三条铁律 "拿不准 → 倾向跳过 + 透明声明"). prompt-inject method delivered
@@ -76,4 +66,3 @@ rules:
76
66
  if you actually need it."
77
67
  enforcement: warn
78
68
  trigger: gate_evaluation_low_confidence
79
- check_method: prompt-inject
@@ -7,19 +7,15 @@
7
7
  schema_version: harnessed.discipline.v1
8
8
  discipline: operational
9
9
  enforcement_layer: commit
10
- auto_enforce: true
11
10
 
12
11
  rules:
13
12
  - id: biome-preempt
14
13
  description: |
15
14
  TS/JS commit 前必跑 `pnpm exec biome check --write` (3 CI-red recurrences Phase 2.1.1/2.2/2.3 project memory)
16
- enforcement: auto-fix
15
+ enforcement: warn
17
16
  trigger: |
18
17
  phase.type == 'commit' AND
19
18
  changed_files matches '\\.(ts|tsx|js|mjs)$'
20
- check_method: external-cmd
21
- auto_fix_cmd: 'corepack pnpm exec biome check --write'
22
- # NEW src/discipline/enforcement/before-commit.ts hook; exit 0 才允许 commit
23
19
 
24
20
  - id: a7-adr-conservation
25
21
  description: |
@@ -27,15 +23,12 @@ rules:
27
23
  (sister Phase 1.3-2.6 ADR errata 路径)
28
24
  enforcement: warn
29
25
  trigger: phase.type == 'commit' AND changed_files contains 'docs/adr/'
30
- check_method: external-cmd
31
- auto_fix_cmd: 'scripts/check-adr-conservation.sh'
32
26
 
33
27
  - id: no-push-without-approval
34
28
  description: |
35
29
  NEVER push to remote without user explicit approval (project CLAUDE.md commit safety)
36
30
  enforcement: halt
37
31
  trigger: cmd.type == 'git-push'
38
- check_method: external-cmd
39
32
  # completion-gate loop / subagent 自动调 git push → halt;user explicit `git push` 在主 session 允许
40
33
 
41
34
  - id: no-skip-hooks
@@ -43,14 +36,12 @@ rules:
43
36
  不允许 --no-verify / --no-gpg-sign 等 skip hook flag,除非用户明确要求
44
37
  enforcement: halt
45
38
  trigger: cmd.type == 'git-commit' AND args contains '--no-verify'
46
- check_method: regex
47
39
 
48
40
  - id: destructive-ops-explicit
49
41
  description: |
50
42
  Destructive ops (git reset --hard / push --force / rm -rf / drop table) 必须用户 explicit 确认
51
43
  enforcement: halt
52
44
  trigger: cmd.is_destructive == true
53
- check_method: heuristic
54
45
  # heuristic — 命令含 'rm -rf' / 'reset --hard' / '--force' / 'DROP TABLE' / 'delete from'
55
46
 
56
47
  - id: authorization-not-transitive
@@ -58,7 +49,6 @@ rules:
58
49
  用户 approve 一次 push ≠ 全程 approve;每个 destructive / shared-state 操作单独确认
59
50
  enforcement: warn
60
51
  trigger: cmd.requires_approval == true AND session.has_prior_approval == true
61
- check_method: heuristic
62
52
 
63
53
  # v3.6.0 Phase 3 — transparent-skip discipline (P0b 下半,Audit § fallback
64
54
  # 三条铁律 "拿不准 → 倾向跳过 + 透明声明"). prompt-inject method delivered
@@ -76,4 +66,3 @@ rules:
76
66
  if you actually need it."
77
67
  enforcement: warn
78
68
  trigger: gate_evaluation_low_confidence
79
- check_method: prompt-inject
@@ -6,7 +6,6 @@
6
6
  schema_version: harnessed.discipline.v1
7
7
  discipline: output-style
8
8
  enforcement_layer: output
9
- auto_enforce: true
10
9
 
11
10
  rules:
12
11
  # Scope note (2026-07-30) — chat-scope rules carry `trigger: response.target == 'chat'`
@@ -17,34 +16,26 @@ rules:
17
16
  description: Conclusion first (BLUF); each paragraph leads with one sentence giving the answer/judgment/recommendation, then expands the reasoning
18
17
  enforcement: warn
19
18
  trigger: response.target == 'chat'
20
- check_method: heuristic
21
19
  # heuristic — 第一句长度 ≤ 100 char + 含答案动词 ('是' / '不是' / '推荐' / '应该' / 'use X')
22
20
  # 失败 → warn 'BLUF missing: first sentence is not a conclusion'
23
21
 
24
22
  - id: no-sycophantic-open-close
25
23
  description: Remove opening/closing filler phrases like "good question / awesome / perfect / hope this helps / anything else"
26
- enforcement: auto-fix
27
- # chat-scope is load-bearing here: enforcement=auto-fix means strip-sycophantic
28
- # rewrites text, and an unconditional trigger would let it rewrite delivered artifacts.
24
+ enforcement: warn
25
+ # chat-scope keeps this off delivered artifacts (README / CHANGELOG may legitimately
26
+ # use the phrasing a chat reply should not).
29
27
  trigger: response.target == 'chat'
30
- check_method: regex
31
- auto_fix_cmd: 'strip-sycophantic'
32
- # NEW src/discipline/enforcement/strip-sycophantic.ts — regex strip 13 known phrase
33
28
 
34
29
  - id: no-emoji-unless-requested
35
30
  description: No emoji unless the user explicitly requests it (project markdown files such as README/PR/CHANGELOG are not constrained)
36
31
  enforcement: warn
37
32
  trigger: response.target == 'chat' AND user.requested_emoji == false
38
- check_method: regex
39
33
  # regex /\p{Emoji_Presentation}/u; 命中 + trigger fires → warn
40
34
 
41
35
  - id: no-em-dash
42
36
  description: No em-dash (—— / —); instead use parentheses or colons for asides, commas for lists, and a separate sentence for contrast
43
- enforcement: auto-fix
37
+ enforcement: warn
44
38
  trigger: response.target == 'chat'
45
- check_method: regex
46
- auto_fix_cmd: 'replace-em-dash'
47
- # auto-replace '——' → ', ' (单段内逗号);'—' → ':' OR ','
48
39
 
49
40
  # Deliberately always-on (not chat-scope): project files want precise quantifiers too,
50
41
  # and the rule only tightens a requirement — it never produces a wrong artifact.
@@ -52,13 +43,11 @@ rules:
52
43
  description: Precise quantifiers; when a concrete number/filename/line number/commit hash is available, do not say "some/a few/several"
53
44
  enforcement: info
54
45
  trigger: always-on
55
- check_method: llm-judge
56
46
 
57
47
  - id: no-end-recap
58
48
  description: No closing summary unless the user explicitly asks to "summarize/recap"
59
49
  enforcement: warn
60
50
  trigger: response.target == 'chat'
61
- check_method: heuristic
62
51
  # heuristic — 末尾 200 char 含 '## 总结' / '## Summary' / 'In summary' / '综上所述'
63
52
  # → warn 'redundant end recap'
64
53
 
@@ -66,5 +55,4 @@ rules:
66
55
  description: No empty continuation questions ("want me to help you X?" / "anything else?"); keep workflow-necessary next-step guidance
67
56
  enforcement: warn
68
57
  trigger: response.target == 'chat'
69
- check_method: regex
70
58
  # regex /要不要|还需要别的|希望对你有帮助/ + trigger fires → warn
@@ -6,7 +6,6 @@
6
6
  schema_version: harnessed.discipline.v1
7
7
  discipline: output-style
8
8
  enforcement_layer: output
9
- auto_enforce: true
10
9
 
11
10
  rules:
12
11
  # scope 说明 (2026-07-30) — 对话层规则带 `trigger: response.target == 'chat'`,
@@ -17,34 +16,26 @@ rules:
17
16
  description: 结论先行 (BLUF),每段先一句给答案/判断/推荐,再展开理由
18
17
  enforcement: warn
19
18
  trigger: response.target == 'chat'
20
- check_method: heuristic
21
19
  # heuristic — 第一句长度 ≤ 100 char + 含答案动词 ('是' / '不是' / '推荐' / '应该' / 'use X')
22
20
  # 失败 → warn 'BLUF missing: first sentence is not a conclusion'
23
21
 
24
22
  - id: no-sycophantic-open-close
25
23
  description: 删除"好问题/太棒了/完美/希望对你有帮助/还需要别的吗"等开场闭合套话
26
- enforcement: auto-fix
27
- # 这条的 chat-scope 是承重的:enforcement=auto-fix 意味着 strip-sycophantic 会真改文本,
28
- # trigger 无条件生效就等于允许它改写已交付的产物文件文案。
24
+ enforcement: warn
25
+ # chat-scope 让这条不约束已交付的产物文件(README / CHANGELOG 可以合理使用
26
+ # 聊天回复里不该出现的措辞)。
29
27
  trigger: response.target == 'chat'
30
- check_method: regex
31
- auto_fix_cmd: 'strip-sycophantic'
32
- # NEW src/discipline/enforcement/strip-sycophantic.ts — regex strip 13 known phrase
33
28
 
34
29
  - id: no-emoji-unless-requested
35
30
  description: 禁用 emoji,除非用户明确要求 (项目 markdown 文件如 README/PR/CHANGELOG 不约束)
36
31
  enforcement: warn
37
32
  trigger: response.target == 'chat' AND user.requested_emoji == false
38
- check_method: regex
39
33
  # regex /\p{Emoji_Presentation}/u; 命中 + trigger fires → warn
40
34
 
41
35
  - id: no-em-dash
42
36
  description: 禁用 em-dash (—— / —);替代:补充用括号/冒号,并列用顿号,转折单独成句
43
- enforcement: auto-fix
37
+ enforcement: warn
44
38
  trigger: response.target == 'chat'
45
- check_method: regex
46
- auto_fix_cmd: 'replace-em-dash'
47
- # auto-replace '——' → ', ' (单段内逗号);'—' → ':' OR ','
48
39
 
49
40
  # 故意保持 always-on (不改 chat-scope):产物文件也该用精确量词,
50
41
  # 且这条只是把要求收紧,不会主动产生错误产物。
@@ -52,13 +43,11 @@ rules:
52
43
  description: 量词精确,能给具体数字/文件名/行号/commit hash 就不用"一些/几个/多个"
53
44
  enforcement: info
54
45
  trigger: always-on
55
- check_method: llm-judge
56
46
 
57
47
  - id: no-end-recap
58
48
  description: 不做结尾总结,除非用户明确要求"汇总/recap"
59
49
  enforcement: warn
60
50
  trigger: response.target == 'chat'
61
- check_method: heuristic
62
51
  # heuristic — 末尾 200 char 含 '## 总结' / '## Summary' / 'In summary' / '综上所述'
63
52
  # → warn 'redundant end recap'
64
53
 
@@ -66,5 +55,4 @@ rules:
66
55
  description: 禁空洞续作询问 (要不要我帮你 X?/还需要别的吗?);保留工作流必要下一步指引
67
56
  enforcement: warn
68
57
  trigger: response.target == 'chat'
69
- check_method: regex
70
58
  # regex /要不要|还需要别的|希望对你有帮助/ + trigger fires → warn
@@ -6,7 +6,6 @@
6
6
  schema_version: harnessed.discipline.v1
7
7
  discipline: priority
8
8
  enforcement_layer: workflow
9
- auto_enforce: true
10
9
 
11
10
  priority_hierarchy:
12
11
  - gstack # 决策层 最高优先
@@ -37,5 +36,3 @@ rules:
37
36
  e.g., gstack /office-hours + GSD /gsd-discuss-phase fire together → gstack runs first
38
37
  enforcement: warn
39
38
  trigger: capabilities.fired_count > 1
40
- check_method: heuristic
41
- # NEW src/discipline/enforcement/before-spawn.ts hook — sort fired capabilities by tier rank
@@ -6,7 +6,6 @@
6
6
  schema_version: harnessed.discipline.v1
7
7
  discipline: priority
8
8
  enforcement_layer: workflow
9
- auto_enforce: true
10
9
 
11
10
  priority_hierarchy:
12
11
  - gstack # 决策层 最高优先
@@ -37,5 +36,3 @@ rules:
37
36
  e.g., gstack /office-hours + GSD /gsd-discuss-phase 同 fire → gstack 先跑
38
37
  enforcement: warn
39
38
  trigger: capabilities.fired_count > 1
40
- check_method: heuristic
41
- # NEW src/discipline/enforcement/before-spawn.ts hook — sort fired capabilities by tier rank
@@ -3,11 +3,15 @@
3
3
  # Plan→Execute) + 写入边界表
4
4
  # Phase v3.0-3.3 W0.4 ship per D-09
5
5
  # Snapshot of CLAUDE.md as of v3.0 ship date (K7 mitigation, verbatim)
6
+ #
7
+ # 4.43.0 — required_fields / forbidden_phrases / file_ownership were structured
8
+ # fields that nothing ever checked (and `auto_enforce` a switch nothing read). Their
9
+ # content is kept below as description text: same information, no longer
10
+ # pretending to be machine-enforced.
6
11
 
7
12
  schema_version: harnessed.discipline.v1
8
13
  discipline: protocols
9
14
  enforcement_layer: workflow
10
- auto_enforce: false # 默认 NOT auto-enforce — 协议是 cross-session, harnessed 主要 validate
11
15
 
12
16
  rules: []
13
17
 
@@ -15,56 +19,27 @@ protocols:
15
19
  cc-handoff-ideation-to-onboarding:
16
20
  description: |
17
21
  场景 A — Ideation-CC 写自包含产品设计文档;Onboarding-CC 新项目目录读取并启动 GSD
18
- required_fields:
19
- - 业务目的
20
- - 范围/边界
21
- - 关键决策+决策理由
22
- - 技术栈+理由
23
- - 已识别风险
24
- - 推荐 milestone 划分
25
- - "Open questions (OPEN: <问题>, decision required by user)"
26
- forbidden_phrases:
27
- - "TODO"
28
- - "待补充"
29
- - "暂定"
22
+ 必备字段:业务目的 / 范围/边界 / 关键决策+决策理由 / 技术栈+理由 / 已识别风险 /
23
+ 推荐 milestone 划分 / Open questions (OPEN: <问题>, decision required by user)
24
+ 禁用字样:TODO / 待补充 / 暂定
30
25
 
31
26
  plan-execute-cc-ready-metadata:
32
27
  description: |
33
28
  场景 B — Plan-CC 离场 PLAN.md 必须 ready-to-execute (metadata 标记)
34
- required_fields:
35
- - "status: ready-to-execute"
36
- - "每个 task: 精确文件路径"
37
- - "每个 task: acceptance criteria"
38
- - "每个 task: 依赖前置 task 编号"
39
- - "## Open Questions 节为空"
40
- forbidden_phrases:
41
- - "TODO"
42
- - "待补充"
43
- - "暂定"
29
+ 必备:status: ready-to-execute;每个 task 含精确文件路径、acceptance criteria、
30
+ 依赖前置 task 编号;## Open Questions 节为空
31
+ 禁用字样:TODO / 待补充 / 暂定
44
32
 
45
33
  file-ownership-strict:
46
34
  description: |
47
35
  跨 CC 写入边界 — 下游 CC 不修改上游 artifact;歧义写到 PROGRESS.md ## Blocked
48
- file_ownership:
49
- ideation-cc:
50
- - 产品设计文档
51
- onboarding-cc:
52
- - ".planning/* (初始化)"
53
- - 项目代码
54
- plan-cc:
55
- - SPEC.md
56
- - DISCUSS.md
57
- - PLAN.md
58
- - RESEARCH.md
59
- execute-cc:
60
- - PROGRESS.md
61
- - VERIFICATION.md
62
- - 代码
63
- - commit
36
+ ideation-cc:产品设计文档
37
+ onboarding-cc:.planning/* (初始化)、项目代码
38
+ plan-cc:SPEC.md、DISCUSS.md、PLAN.md、RESEARCH.md
39
+ execute-cc:PROGRESS.md、VERIFICATION.md、代码、commit
64
40
  rules:
65
41
  - id: no-modify-upstream-artifact
66
42
  description: |
67
43
  下游 CC 发现上游 artifact 模糊 → 写 PROGRESS.md ## Blocked,不修改上游
68
44
  enforcement: halt
69
45
  trigger: cc.role == 'execute' AND file.target matches 'PLAN.md|SPEC.md|DISCUSS.md|RESEARCH.md'
70
- check_method: file-content-match
@@ -2,6 +2,10 @@
2
2
  # Fallback 三条铁律 — bundled judgment (unsure → tend to skip with transparent disclosure / explicit user signal overrides / tiers independent)
3
3
  # Sister: 不同于 triggers (fires_when/skips_when 模式), 本 file 使用 'rules' 顶级 key
4
4
  # Phase v2.0-2.3 Wave 0 T2.3.W0.2 ship per R20.16 + D-16
5
+ #
6
+ # 4.43.0 — documentation only. The structured fields these rules used to carry
7
+ # (fallback_action / message_template / override_signal / chain_isolation) were
8
+ # never read; each rule is implemented in code, named in its description below.
5
9
 
6
10
  schema_version: harnessed.judgment.v1
7
11
 
@@ -11,25 +15,19 @@ rules:
11
15
  铁律 1 — 拿不准 → 跳过 + 透明声明。
12
16
  Workflow runtime 在 gate eval throw GateEvalError 或 evidence 不足时,
13
17
  emit ⚠️ message 给用户, 不静默跳过。
14
- fallback_action: skip_with_transparency
15
- message_template: "⚠️ 跳过 {gate_name}, 因为 {reason}。如认为需要请明示。"
18
+ 实现:src/workflow/masterOrchestrator-helpers.ts emitGateTransparency(跳过原因逐条打印)。
16
19
 
17
20
  user-explicit-override:
18
21
  description: |
19
22
  铁律 2 — 用户明示 → 覆盖判据。
20
- Workflow runtime 词法匹配 user input, 命中以下任一 signal 强制 invoke,
23
+ Workflow runtime 词法匹配 user input, 命中 signal 强制 invoke,
21
24
  即使 fires_when==false / skips_when==true。
22
- override_signal:
23
- - "先 brainstorm"
24
- - "跑 office-hours"
25
- - "讨论一下"
26
- - "office-hours"
27
- - "brainstorm"
28
- - "深度调研"
25
+ 实现:关键词表在 workflows/judgments/user-overrides.yaml,由
26
+ src/cli/lib/extract-user-overrides.ts 匹配后写入 gateContext.user_overrides。
29
27
 
30
28
  chain-isolation:
31
29
  description: |
32
30
  铁律 3 — 链式互不前置, 跳过战略层 ≠ 必须跳过 phase 层;
33
31
  每层独立判断 (防"上层没跑下层不敢跑"的死板)。
34
32
  Strategic / phase / subtask 三层 gate eval 互相独立, 无父子继承。
35
- chain_isolation: true
33
+ 实现:每个 gate 各自求值,没有任何代码让下层 gate 依赖上层结果。