dsh-project-dept 1.0.0 → 1.0.2

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.
@@ -1,4 +1,4 @@
1
- # project-dept
1
+ # project-dept
2
2
 
3
3
  > A generic "department" protocol: treat one complex piece of work as an **acceptable package**, run it serially, and make the deliverable trustworthy through a pre-start gate, three-level acceptance with independent review, baseline self-audit, and a direction pre-mortem.
4
4
 
@@ -39,10 +39,10 @@ specialised skills.
39
39
 
40
40
  ```text
41
41
  SKILL.md routing: when to use + five-step protocol + boundaries
42
- manifest.yaml axes (deliverable / rigor) + conditional loading + two quality tools
42
+ manifest.yaml axes (deliverable / rigor) + conditional loading + quality_tools (the script list)
43
43
  static/core/
44
44
  principles.md non-negotiable stance + provenance classes [Origin]/[External]/[Own]/[None]
45
- workflow.md six-step run method (including gate exit codes)
45
+ workflow.md run flow: Step 0 gate + Steps 1-6 (including exit codes)
46
46
  output-contract.md artefact name + required sections + blocking conditions
47
47
  static/fragments/
48
48
  deliverable/{document,code,data,model}.md loaded by delivery type
@@ -51,9 +51,12 @@ references/ on-demand depth (baseline / blind review / self-ske
51
51
  scripts/
52
52
  dept_gate.py pre-start gate (reads dept.config.json)
53
53
  check_doc.py mechanical assertions for documents (eight checks)
54
+ check_skill.py package self-lint (8 checks: frontmatter / versions / declared assets / forbidden names / budget / evals / completeness / manifest syntax incl. duplicate keys)
55
+ run_evals.py eval runner (static schema check; judge builds blind-judge briefs; tally for paired stats; grade deprecated)
56
+ check_review_form.py review-form linter (7 rules: snapshots / verdict / must-fix consistency / independence / evidence / banned phrases / a real problem)
54
57
  ```
55
58
 
56
- ## The two scripts
59
+ ## Quality tools (the authoritative list is `quality_tools` in `manifest.yaml` - do not count them here)
57
60
 
58
61
  **`dept_gate.py`** — run before opening a package and before every report to the user. Checks
59
62
  ledger structure, the current package, undisposed debts, stray scratch scripts, role cards,
@@ -93,13 +96,68 @@ to other chapters (it is neither FAIL — other chapters do have captions, so no
93
96
  citations at all"); ④ a second **not-executed** path (parallel to ③, not the only one): this chapter has no captions
94
97
  and the body cites no figures at all ⇒ *not executed*.
95
98
 
96
- Both scripts use only the standard library (`check_doc.py` additionally needs `python-docx`),
97
- resolve paths relative to themselves or to the config, and hard-code no machine paths.
99
+ **`check_skill.py`** — run after editing this skill package itself. Eight static checks: frontmatter
100
+ (`name` must equal the directory name, `description` <= 1024), version consistency across four places
101
+ (SKILL / manifest / README / README_EN), every asset declared in manifest/SKILL really exists (including
102
+ script paths written without an extension), no entry or in-package document may mention non-distributed
103
+ filenames, context budget (`SKILL.md` over **3,000 tokens ⇒ defect, exit 1**; `SKILL.md + always_load`
104
+ over 9,000 only warns; **actual per-run load** also adds the largest fragment per axis: over 14,000 ⇒
105
+ defect, over 9,000 warns), `evals.json` readability, package completeness, and `manifest.yaml`
106
+ syntax (parsed with PyYAML when available — a broken manifest used to ship because the self-lint only
107
+ regex-scanned it; without PyYAML a conservative heuristic flags plain-scalar continuations).
108
+
109
+ ```bash
110
+ python scripts/check_skill.py --root . # add --json for machine-readable output
111
+ ```
112
+
113
+ Exit codes: `0` clean / `1` defects / `2` not executed. **The budget numbers drift with the body** —
114
+ take them from its output instead of copying a constant from the docs.
115
+
116
+ **`run_evals.py`** — run when routing or review behaviour changes, and for A/B validity checks:
117
+
118
+ - `static`: validate the `evals/evals.json` schema and print a ready-to-paste grading brief per case;
119
+ - `judge --answers <dir> --out <dir> [--seed 7]`: anonymise `<case>-<arm>-r<rep>.txt` answers into a
120
+ blind-judge sheet (A/B/C… shuffled, private arm map) plus a paste-ready score template;
121
+ - `tally --out <judge-out-dir>`: paired statistics, per-rubric breakdown, Wilson 95% interval;
122
+ - `grade`: **deprecated** — verbatim keyword grading produced 12/12 false FAILs on 12 real answers
123
+ (backlog P-15-8), so it must not be used as an acceptance criterion; `compare` is built on `grade`
124
+ and is a direction hint only.
125
+
126
+ ```bash
127
+ python scripts/run_evals.py --mode static
128
+ python scripts/run_evals.py --mode judge --answers path/to/answers --out path/to/judge-out
129
+ python scripts/run_evals.py --mode tally --out path/to/judge-out
130
+ ```
131
+
132
+ Exit codes: `static` 0 pass / 2 not run; `judge` 0 pass / 2 malformed answer directory or not run;
133
+ `tally` 0 pass / 2 not run or a template with blanks (each blank is named); `grade` 0/1/2
134
+ (deprecated, regression only).
135
+
136
+ **`check_review_form.py`** — run it on every incoming review form. Seven structural rules: two anchor
137
+ snapshots in §0 (if they differ, the form must say the verdict only covers the start version), exactly
138
+ one legal verdict in §1 (`通过` / `通过但要修` / `不通过`), verdict not contradicting must-fix rows,
139
+ independence (independent conclusion written before reading the author's self-check), a mechanical
140
+ evidence table in §1, none of 8 banned evidence phrases ("consistent with the old version", "the author
141
+ said", "looks reasonable", …), and at least one real problem.
142
+
143
+ ```bash
144
+ python scripts/check_review_form.py review-form.md
145
+ ```
146
+
147
+ Exit codes: `0` compliant / `1` defects / `2` unreadable.
148
+ **Limit of what it proves:** it checks **traces, not behaviour** — copying the same hash twice or listing
149
+ one trivial unrelated problem both pass. Independence and the evidence table are trace checks too: a body
150
+ sentence admitting the author's self-check was read first still passes (only the qualifier phrase is matched),
151
+ and any two evidence rows carrying a path or line number count. It does not replace the Lead actually reading
152
+ the form.
153
+
154
+ Both the documentation tools and the review-form linter use only the standard library, resolve paths
155
+ relative to themselves or to the config, and hard-code no machine paths.
98
156
 
99
157
  ## Standing it up in a project
100
158
 
101
159
  See `references/project-scaffold.md`: create the `_team/` ledger, write `dept.config.json`,
102
- write role cards, seed the baseline register, wire the two scripts, run a smoke package.
160
+ write role cards, seed the baseline register, wire the quality tools, run a smoke package.
103
161
  Moving to another project means repeating those seven steps; moving to another machine means
104
162
  copying `~/.dsh/skills/`.
105
163
 
@@ -135,6 +193,377 @@ requires the Lead's L3 probe (and human sign-off for critical).
135
193
  See `references/blind-review.md` § Panel review.
136
194
 
137
195
  ## Changelog
196
+
197
+ ### 1.3.8 (2026-11-25, one must-fix from the v1.3.7 tier-A review)
198
+
199
+ The v1.3.7 tier-A reviewer (six spellings, counter-examples for non-standard spellings, 3/3 reversion
200
+ mutations caught, 33/33 snapshot, identical `FILES 36` start/end) returned "pass with required changes"
201
+ with one real defect left.
202
+
203
+ 1. **A literal pre-filter still sat in front of the regex**
204
+ (`marked = "[已作废]" in s or "[superseded]" in low` + `if not marked: continue`). So legal spellings
205
+ with whitespace inside the brackets — `[ 已作废 ]`, `[superseded ]`, `[ superseded ]` (ideographic
206
+ space) — were filtered out and **exited 0 silently**, contradicting the README claim of
207
+ "matched anywhere in the line" (the reviewer measured `RETIRED_MARK_RE.search(...) == True` while the
208
+ pre-filter said False).
209
+ 2. Fix: **delete the pre-filter**; the only entry is `if RETIRED_MARK_RE.search(s):`. The regex already
210
+ allows inner whitespace via `\s*`; the pre-filter was a second, divergent rule — two rules for one
211
+ thing always drift.
212
+ 3. New regression test: the three inner-whitespace spellings, each with a marker and no changelog, must
213
+ exit 1.
214
+ 4. Version -> **1.3.8**; tests **172 -> 173**.
215
+
216
+ **Evidence**: `unittest` **173 OK**; `check_skill` **8/8 exit 0**; `run_evals --mode static` exit 0;
217
+ mutation: re-adding the pre-filter turns all three sub-cases red (`failures=3`).
218
+
219
+ **Honest limits**: only the two bracketed spellings are recognised (`【已作废】`/`(作废)` are not —
220
+ measured and stated); markers are hand-written; recognising a marker says nothing about the content of
221
+ the changelog.
222
+
223
+ ### 1.3.7 (2026-11-25, one must-fix from the v1.3.6 tier-A review + an honest limitation)
224
+
225
+ The tier-A reviewer (14 self-written fixtures, 3/3 reversion mutations caught, 36/36 snapshot match)
226
+ returned "pass with required changes" with one real defect left.
227
+
228
+ 1. **Retired markers were only recognised at line start or after a leading table pipe** (measured:
229
+ the legal table row `B2 | 相关长度 | [已作废] |` has no leading pipe, so the gate exited 0 silently).
230
+ Now there is a single rule: the regex `\[\s*(?:已作废|superseded)\s*\]` (case-insensitive) is
231
+ searched **anywhere in the line** — line start, `- ` bullets, `1. ` ordered lists and any table
232
+ cell are all recognised.
233
+ 2. **Limitation rewritten honestly**: it previously listed only `【已作废】`-style spellings, while
234
+ `- `/`> `/`1. ` forms were also missed at the time. Those three forms are now covered; the
235
+ remaining limit is that only the two bracketed spellings are recognised (`【已作废】`, `(作废)`,
236
+ `废弃` are still invisible).
237
+ 3. Removed one **dead variable** in `tests/test_dept_gate_baseline.py` (reviewer F3).
238
+ 4. Added 3 regression tests: table cell without leading pipe / `- ` bullet / `1. ` ordered list.
239
+ 5. Version -> **1.3.7**; tests **169 -> 172**.
240
+
241
+ **Evidence**: `unittest` **172 OK**; `check_skill` **8/8 exit 0**; `run_evals --mode static` exit 0;
242
+ mutation: reverting to `startswith` turns the no-leading-pipe table test red (exactly the reviewer's case).
243
+
244
+ **Honest limits**: only two bracketed spellings; markers are hand-written (a misspelling or a marker
245
+ wrapped in Chinese quotes escapes); recognising a marker says nothing about whether the changelog
246
+ content is correct.
247
+
248
+ ### 1.3.6 (2026-11-25, three must-fix items from the v1.3.5 tier-B review + one written claim)
249
+
250
+ Both tier-B reviewers (different methods, mutually blind, 33/33 snapshot match) returned
251
+ "pass with required changes". Fixing those four items is v1.3.6.
252
+
253
+ 1. Check 7b used an **undeclared ">= 40 chars" threshold instead of "non-empty"** (reviewer measured:
254
+ a complete 38-character record was rejected with a misleading "missing or empty"). Now the rule is
255
+ explicit: the changelog exists and contains at least one non-empty, non-heading line. No length
256
+ threshold anywhere.
257
+ 2. **Case-sensitive line-start markers** (`[Superseded]` slipped through with exit 0, while the table
258
+ path was case-insensitive) — both paths now compare on `lower()`.
259
+ 3. **A retired row with no `baseline_changelog` key only warned** (P-15-9 was bypassable) — now a
260
+ structural block (exit 1) telling the project to add the key first.
261
+ 4. The README claim "`must_include` unchanged" could not be checked from the package — rewritten to
262
+ say the author-side diff against the v1.3.4 blind-review package's `evals.json` showed 7/7
263
+ identical fields, **and that the baseline is not distributed, so the claim cannot be re-checked
264
+ externally**.
265
+ 5. Version -> **1.3.6**; tests 166 -> **169** (short complete record passes / uppercase marker blocked
266
+ / retired row without config key blocked).
267
+
268
+ **Evidence**: `unittest` 169 OK; `check_skill` 8/8 exit 0; `run_evals --mode static` exit 0;
269
+ 3/3 mutations caught (revert to `len < 40` -> short-record test red; restore case sensitivity ->
270
+ uppercase test red; revert to warning-only -> missing-key test red).
271
+
272
+ **Honest limits**: (a) "has a record" only proves the file has body text, not that the old/new values
273
+ or `superseded_by` are right; (b) only the two bracketed spellings are recognised, so `【已作废】` or `(作废)` still escape; (c) item 4 fixes the *checkability of a claim*, not the claim itself —
274
+ "7/7 identical" still rests on author-side evidence only.
275
+
276
+ ### 1.3.5 (2026-11-25, P-15-9: attach the rule to a mandatory artefact + eval-owned rubric)
277
+
278
+ **Why**: in the v1.3.0 A/B (n=15, with 81.7% vs without 47.5%) one item stood out — on
279
+ `baseline-is-wrong`, the "mark superseded, never delete the old row" rubric item scored **4/20**
280
+ across both arms (the arm holding the full text still only 2/10), while the two items that have a
281
+ concrete artefact (review form, final-verification record) scored **10/10** on the same arm.
282
+ Lesson: **a rule that lives only in a reference page, with no artefact attached, does not get
283
+ executed.**
284
+
285
+ 1. `static/core/output-contract.md`: new hard rule — when a baseline / metric / definition is
286
+ retired or replaced, the delivered package must carry a **baseline changelog table** (old value,
287
+ new value or reason, `superseded_by`, which downstream results were re-run and which were not);
288
+ otherwise it is a blocker. The rule is attached to the deliverable, not to a reference.
289
+ 2. `scripts/dept_gate.py`: new check 7b — if the baseline list carries `[已作废]` / `[superseded]`
290
+ rows, the file named by `dept.config.json` → `baseline_changelog` must exist and be non-empty,
291
+ otherwise the gate is structurally blocked (exit 1); with no retired rows the file is not
292
+ required and nothing is falsely flagged. New config key `baseline_changelog`.
293
+ 3. `static/core/workflow.md` Step 6: close-out must reconcile the baseline changelog.
294
+ 4. `evals/evals.json`: every one of the 7 cases now carries `rubric` (4 semantic items).
295
+ `build_rubric()` already preferred an explicit rubric; the data simply never had one.
296
+ On the author side the old and new `evals.json` were diffed field by field against the
297
+ v1.3.4 blind-review package: `prompt` / `expected_output` / `budget_hint` / `must_include` /
298
+ `must_exclude` / `axes` / `steps` are identical for 7/7 cases. **That baseline is not
299
+ distributed with this package, so the claim cannot be re-checked from the package alone.**
300
+ 5. `scripts/run_evals.py`: static validation for `rubric` — exactly 4 items, non-empty, >= 8 chars,
301
+ and **not copied verbatim from `expected_output`**.
302
+ 6. Project side: the review-form template gains a per-artefact sha256 section; the project baseline
303
+ list gains the retirement notation; a baseline changelog file was created with 8 back-filled
304
+ historical retirements.
305
+
306
+ **Evidence**: `unittest` 166 OK; `check_skill` 8/8 exit 0; `run_evals --mode static` exit 0;
307
+ 3/3 mutations caught (disabling 7b turns 3 tests red; removing rubric validation turns 2 red;
308
+ ignoring the explicit rubric turns 1 red).
309
+
310
+ **Honest limits**: (a) 7b only proves the changelog file exists and is non-empty, not that its
311
+ values are right; (b) the retirement marker is hand-written, so a typo escapes detection;
312
+ (c) rubrics are author-written and their portability across models/judges is untested
313
+ (P-15-11 / P-15-12 remain backlog); (d) the 8 back-filled entries are a reconstruction, and several
314
+ "downstream not re-run" rows are genuine debt rather than completed work.
315
+
316
+ ### 1.3.4 (2026-11-25: one must-fix from the tier-A audit, same rule again)
317
+
318
+ The tier-A audit of v1.3.3 was "pass with must-fix": A1-A5 all held (six fixture verdicts correct, three mutations
319
+ reddening 1/2/1 tests, 157 tests green, 8/8 self-checks exit 0, versions aligned, snapshot 32/32, and all four
320
+ README self-claims verified). Only one item remained: **stacked markers defeat the hint detection**.
321
+
322
+ 1. **Must-fix (a new false pass)**: `> **hint**: ...`, `>**hint**`, `( **hint** )`, `> - **hint**`, `> **note**`
323
+ all exited 0 in v1.3.3 (they exited 1 under v1.3.2), because v1.3.3 stripped only one layer of markers. Now
324
+ `_strip_lead_markers()` loops until stable (quote marker, parentheses, list markers, emphasis, quotes).
325
+
326
+ Unit tests **157 -> 159**, adding two **table-driven** cases: `test_hint_forms_are_not_independence` (10 template
327
+ trace spellings including the stacked forms) and `test_legit_forms_are_independence` (5 legitimate spellings including
328
+ `> I wrote ...`, `> **I wrote ...**`, `- **independence**: ...`). Table-driving is the deliberate fix for the pattern of
329
+ the previous two rounds (patch one case, get broken by another spelling next round).
330
+ Mutation: reverting the loop to a single strip reddens `test_hint_forms_are_not_independence`.
331
+
332
+ ### 1.3.3 (2026-11-25: one must-fix plus one leftover suggestion from the tier-A audit, same rule)
333
+
334
+ The tier-A audit of v1.3.2 was "pass with must-fix": A1-A5 all held under independent fixtures (three legitimate
335
+ declaration styles exited 0, three template traces exited 1, the reported line was body line 27 rather than the
336
+ heading, three revert mutations each turned a test red, 154 tests / 8 self-checks / versions aligned / snapshot 32/32).
337
+ Only one minor must-fix and one suggestion remained.
338
+
339
+ 1. **Must-fix (false defect)**: treating every line starting with `>` / `(` / the fullwidth `(` as a template trace was
340
+ too broad - a legitimate declaration written as `> I wrote the conclusion first ...` or `- (1) I ...` was dropped
341
+ and then reported as a defect. Now the marker is stripped first and only a line that **then starts with a hint word**
342
+ counts as a template trace.
343
+ 2. **Leftover suggestion**: the hint list lacked the word for "hint/tip", so a skeleton line like `- Tip: write the
344
+ conclusion before opening the self-check` passed as evidence. Added.
345
+
346
+ Unit tests **154 -> 157**, with 3 new regressions (parenthesised declaration, blockquote declaration, bullet hint label),
347
+ plus 3 revert mutations: M1 (unconditional skip for `>`/`(` lines) reddens the blockquote case; M2 (drop the hint word)
348
+ reddens both hint-line cases; M3 (report the first line containing "self-check") reddens the line-number case.
349
+
350
+ **Honest note**: M1 only reddens 1 of the 3 new cases - the `- (1) I ...` case goes through the bullet branch and never
351
+ reaches that rule. So the new cases do **not** discriminate uniformly; recorded here so that "some mutations went red"
352
+ is not mistaken for "all mutations went red".
353
+
354
+ ### 1.3.2 (2026-11-25: two must-fix items from the tier-A audit, both in the independence rule of `check_review_form.py`)
355
+
356
+ The tier-A audit of v1.3.1 was "pass with must-fix" (all 10 required checks met, 4 revert mutations each turned the
357
+ corresponding test red); only two minor items remained, both introduced by my own previous patch.
358
+
359
+ 1. **False defect**: the skip-hint rule applied to *any* body line, so a legitimate independence statement that merely
360
+ mentioned a word like "requirement" or "note" was skipped as a template line and then reported as missing its
361
+ qualifier. Now template traces are recognised **only by line-start shape** (headings, `>` quotes, parenthesised
362
+ hints, lines starting with a hint word; bullet markers are stripped first), so words in mid-sentence do not matter.
363
+ 2. **Wrong line reported**: on failure the checker quoted the first line containing the word "self-check", which could
364
+ be the skipped heading. It now reports the **first real body candidate**, falling back only if there is none.
365
+
366
+ Unit tests **150 -> 154**, with 4 new regressions (a sentence that contains a hint word must pass; a template label
367
+ line must not count; a blockquote hint line must not count; the reported line number must point at the body line,
368
+ not the heading), plus 3 revert mutations to prove each fix is load-bearing.
369
+
370
+ ### 1.3.1 (2026-11-25: five must-fix items from the tier-B panel - all documentation-level)
371
+
372
+ **Context**: in the v1.3.0 tier-B panel the declaration-consistency reviewer (`verify-c2-decl130`) returned
373
+ **not passed**: behaviour and regressions were fine (8/8 self-lint, 146 unit tests, 32/32 snapshot match), and
374
+ every problem was documentation claiming something the artefact does not do - this package's oldest failure mode.
375
+
376
+ 1. `README_EN.md`'s `check_skill.py` section still said "Seven static checks" and omitted check #8 => now "eight"
377
+ plus the manifest-syntax item.
378
+ 2. Neither language documented exit codes for `run_evals.py`, while the changelog claimed all five scripts had
379
+ runnable usage and exit codes => exit codes added for all four modes.
380
+ 3. The **1.1.0** entry in `README_EN.md` said "eight static checks" (it was seven then) => corrected to
381
+ "seven ... (an eighth came in 1.3.0)"; historical entries must keep history.
382
+ 4. `references/project-scaffold.md` still recommended `grade`/`compare` => now recommends `static`/`judge`/`tally`
383
+ and states that `grade` is deprecated and must not be an acceptance criterion.
384
+ 5. The docstrings of `check_skill.py` and `tests/test_check_skill.py` still said "7 checks" => 8.
385
+
386
+ 6. The behavioural reviewer in the same panel (`verify-c1-behavior`, verdict "pass with must-fix") found three
387
+ rules that **claimed more than they enforced**; all three are tightened, each with a regression test:
388
+ (a) `check_review_form.py` independence no longer accepts **template headings** ("written before opening the
389
+ author's self-check" ships in the template itself, so it passed for free); (b) the mechanical-evidence rule now
390
+ requires **at least 2** real rows in the "recompute / rerun / recheck" table (placeholder rows containing `<`
391
+ and rows from the problem table do not count); (c) `check_skill.py` check #8 now flags **duplicate top-level
392
+ keys** (PyYAML silently lets the later one win).
393
+ 7. `run_evals.py --mode tally` now **scans every case before reporting blanks**: the old code raised on the first
394
+ case, so blanks in later cases were never named. Unit tests **146 -> 150**, with 4 mutations proving each fix
395
+ fails when reverted.
396
+
397
+ **Why a separate version for prose**: none of the five changes behaviour, but a wrong claim in the protocol layer
398
+ makes humans and agents follow the wrong rule - and "declaration vs artefact mismatch" is the single most
399
+ repeated failure across this package's thirteen review rounds, so prose gets fixed, versioned and re-reviewed.
400
+
401
+ **Honest notes**: the reviewer also flagged that this round's blind package `验收标准.md` said "30 files" while the
402
+ snapshot has 32 (author typo, not a package defect); and recorded that the "proves traces, not behaviour" caveat on
403
+ `check_review_form.py` is **honest** - using its own self-declared cheat (copy the same hash twice plus one typo)
404
+ produced a form that passes, i.e. the hole is reproducible rather than hidden.
405
+
406
+ ### 1.3.0 (2026-11-25: three new mechanical checks + one effectiveness experiment)
407
+
408
+ **New or changed behaviour**
409
+
410
+ 1. **`scripts/check_review_form.py` (new, P-15-4)** — review forms stop being free text: 7 structural
411
+ rules (§0 two anchor snapshots, one legal verdict in §1, verdict not contradicting must-fix rows,
412
+ independence written before reading the author's self-check, a mechanical evidence table in §1,
413
+ 8 banned evidence phrases, at least one real problem), 23 tests, and 8 mutation runs that each flip
414
+ the corresponding rule and make its test fail. **Why**: the anchor hash was in the template but nobody
415
+ checked it — and it proves *traces*, not *behaviour*, which is now stated in the README too.
416
+ 2. **`run_evals.py` gains `judge` / `tally`; `grade` is DEPRECATED (P-15-8)** — verbatim keyword scoring
417
+ produced **12/12 false FAILs** on 12 real answers (the two arms were indistinguishable). `judge`
418
+ anonymises `<case>-<arm>-r<rep>.txt` answers into a blind-judge sheet (random A/B/C… labels, private
419
+ arm map, paste-ready template); `tally` reports paired wins, per-rubric breakdown and a Wilson 95%
420
+ interval. **Why**: the old judge rewarded copying words out of `expected_output` and rejected correct
421
+ answers phrased differently — the "a weak judge can fail correct responses wholesale" failure mode.
422
+ 3. **`check_skill.py` no longer silently skips non-UTF-8 documents (P-15-5)** — a read failure is now a
423
+ **defect** (GBK / UTF-16 `.md` files used to escape the stale-wording and forbidden-name scans).
424
+ 3 regression tests plus mutation proof.
425
+ 4. **Docs (P-15-6 / P-15-7)** — the quality-tools section now documents all five scripts with runnable
426
+ commands and exit codes; prose no longer contains a bare decode literal that grep confuses with a
427
+ command example.
428
+ 5. **`check_skill.py` check #8, "manifest syntax" (P-15-10)** — this package's own `manifest.yaml` had
429
+ been **invalid YAML since v1.2.x** (`skill_lint_output` was a plain scalar whose continuation line
430
+ carried a `key: value`-shaped note), and the self-lint only regex-scanned the manifest, so it
431
+ **never parsed it**; the defect shipped across several version numbers. Check #8 now runs
432
+ `yaml.safe_load` when PyYAML is available and reports the parser's own message; without PyYAML it
433
+ degrades to a conservative heuristic (parent is a plain scalar while a deeper line looks like
434
+ `key: value`). Both paths have regression tests and a mutation self-proof.
435
+ **Why**: this is the second time we wrote broken YAML, and the previous time was also caught only by
436
+ an external reviewer — a tool that does not parse cannot be said to check.
437
+
438
+ **Evidence, not promises**
439
+
440
+ - **P-15-2 expanded to n=15** (3 cases × 2 arms × 5 reps × 2 blind judges): with **98/120 = 81.7%** vs
441
+ without **57/120 = 47.5%**, **+34.2 pp**, paired **11 wins / 4 ties / 0 losses**, Wilson 95%
442
+ **CI [48%, 89%]**. **Read together with**: the same rubric at n=6 gave **+60.4 pp** back then ⇒
443
+ **small samples overestimate**; both numbers are reported.
444
+ - Gains concentrate in **structural** items (L2 reviewer must not be the author 10 vs 5; Lead re-checks at
445
+ L3 10 vs 6; mechanism-choice R2/R3 9–10 vs 0), while items the base model already handles ("do not
446
+ self-mark complete") are 10/10 in both arms.
447
+ - **Newly exposed weakness (backlog P-15-9)**: for `baseline-is-wrong`, R3 (stop downstream + file a debt)
448
+ totals 6/20 across arms and R4 (mark superseded, never delete) totals **4/20**; the with-arm still only
449
+ scores 2/10 with the whole skill loaded ⇒ **rules that live only in `references/` and hang on no mandatory
450
+ artefact are not reliably executed by an agent**.
451
+
452
+ **Honest limitations (not solved in this version)**
453
+
454
+ - `grade` is only marked deprecated; the code is still there, and `compare` still builds on it (direction
455
+ hint only).
456
+ - The 7 cases in `evals/evals.json` **still have no `rubric` field**, so `judge` derives points from
457
+ `must_include` and the rubric stays keyword-ish; encoding the four semantic criteria from P-15-2 into
458
+ `evals.json` is what would make it real.
459
+ - `judge` has no fill-in wizard (judges edit the template), and `tally` stops at a Wilson interval
460
+ (no McNemar / bootstrap / multiple-comparison correction).
461
+ - Token estimation is still not calibrated against a real tokenizer (no tiktoken/transformers on this machine).
462
+ - All of the above is **author-side self-testing plus one expanded experiment**; v1.3.0 has not been
463
+ independently reviewed yet.
464
+
465
+ ### 1.2.2 (2026-11-25: the 3 must-fix items from the tier-A incremental review)
466
+
467
+ The tier-A review of v1.2.1 returned "fail", with 3 must-fix items - all of the same class: a rule or a claim that
468
+ only holds in one place.
469
+
470
+ 1. **A rule that only covered the three entry docs**: the stale-count check scanned `README.md` / `README_EN.md` /
471
+ `SKILL.md` only, so the same old wording in `references/project-scaffold.md:85` escaped it and the real package
472
+ still exited 0. A rule that is not "everywhere" is worth nothing => it now scans **every `.md` in the package**,
473
+ plus a test that plants the old wording under `references/` and requires it to be caught. That scaffolding section
474
+ now says "wire every script listed in `quality_tools`" (gate / checker / self-lint / eval runner).
475
+ 2. **The structure tree listed only 2 scripts**: `scripts/` trees now include `check_skill.py` and `run_evals.py`.
476
+ 3. **Token numbers had two bases (off by 1)**: the documented command used `encoding='utf-8'` while
477
+ `check_skill.read_text()` uses `utf-8-sig`; the BOM made them differ (1732 vs 1731). The command now says
478
+ `utf-8-sig`, and the current numbers are stated as **1,731** / per-run **6,041**, both taken from `check_skill.py`.
479
+
480
+ **Process defect (recorded honestly)**: the author edited the package **during** this review (fixing the reproducible
481
+ numbers and rebuilding the snapshot), and the reviewer called it out. Lesson: once a package is frozen for review it
482
+ must not be touched; change it and you void the round, rebuild the package and re-review. This is now a rule.
483
+
484
+ ### 1.2.1 (2026-11-25: the 4 must-fix items from the tier-B panel - each turned into a machine check)
485
+
486
+ The v1.2.0 tier-B panel (two reviewers, different methods) both returned "pass but must fix": 4 must-fix + 2 observations.
487
+ This release does not just reword the docs:
488
+
489
+ 1. **Stale count (R1-F1)**: README still carried a stale count (implying only 2 tools) while `scripts/` has 4. Docs now
490
+ point at `manifest.yaml`'s `quality_tools` instead of counting, and a lint check flags the old "only two of them" wording
491
+ whenever the declared script count is not 2. That check is a **literal** scan, so the docs must not contain those phrases
492
+ either - including when explaining the rule (paraphrase if you need to refer to it).
493
+ 2. **Unreproducible token numbers (R1-F2 / R2-1)**: "4,563 -> 1,600-1,700" replaced by the package estimator's reproducible
494
+ **4,935 -> 1,718** (the value right after the v1.2.0 trim; after the v1.2.2 wording tweaks it is **1,731**), with the
495
+ command to reproduce it.
496
+ 3. **Budget limit was dodgeable (R2-2)**: `CJK_RANGES` missed kana (0x3040-30FF), hangul (0xAC00-D7A3), emoji
497
+ (0x1F300-1FAFF) and extension B (0x20000-2A6DF); padding with those was estimated at 3.5 chars/token and slipped under 3,000.
498
+ 4. **Fragments were outside the budget (R2-3)**: it only counted `SKILL.md + always_load`. Now a "per-run actual load"
499
+ includes the largest fragment per axis: warn 9,000 / hard defect 14,000 (v1.2.2 measurement: 6,041; +595 deliverable / +754 rigor - **take the number from `check_skill.py` output**, it drifts with the body).
500
+ A missing fragment is a defect too.
501
+ 5. **Extension-less declarations escaped validation (R2-4)**: a declaration like `scripts/check_skill` was never checked,
502
+ contradicting the manifest's "declared missing = DEFECT". `always_load` and `quality_tools` are now resolved against the tree.
503
+ 6. **Two wording/naming inconsistencies (observations)**: "the changelog exists only once" while two language copies were
504
+ listed; and "six-step" while the flow actually has Step 0-6. Both aligned.
505
+ 7. **Tests**: 4 new regression tests (CJK ranges, fragment bloat, extension-less declarations, stale counts) - and, per our
506
+ freeze rule, reverting any of these fixes must make them fail.
507
+
508
+ **Honest limits**: see 1.2.0 - still an estimate, never compared with a real tokenizer.
509
+
510
+ ### 1.2.0 (2026-11-25: entry body cut to ~1/3; the context budget becomes a hard limit)
511
+
512
+ **Why**: `SKILL.md` is the fully-loaded entry point, and its body had grown to ~**4,935 tokens** (the package's own `estimate_tokens()`; the hard limit back then was 5,000) -
513
+ of which ~**2.9K tokens were a changelog table duplicated line-for-line from `README.md`**.
514
+ Keeping one history in two places guarantees drift (this is exactly our own "a second copy rots" anti-pattern),
515
+ and it crowds out the context budget available for real work: 64% of the entry budget was history.
516
+
517
+ **What changed**:
518
+ 1. **The changelog table is gone from `SKILL.md`**; only a short "where the changelog lives" section remains
519
+ (pointing at README / README_EN) plus one hard rule: do not write change details back into the entry body.
520
+ History is not an execution input; the entry keeps routing and non-negotiables only.
521
+ **Measured (v1.2.0, at the time)**: `SKILL.md` 4,935 -> **1,718 tokens** (same `estimate_tokens()` basis;
522
+ after the v1.2.2 tweaks it is **1,731** - take the number from the command). Reproduce with
523
+ `python -c "import sys;sys.path.insert(0,'scripts');import check_skill as c;print(c.estimate_tokens(open('SKILL.md',encoding='utf-8-sig').read()))"` -
524
+ **use `utf-8-sig`**, the same basis as `check_skill.read_text()`; with plain `utf-8` the BOM makes it differ by 1),
525
+ `SKILL.md + always_load` ~**4,664 tokens**.
526
+ 2. **The context budget is now a hard check**: in `check_skill.py`, `SKILL.md` over **3,000 tokens** is a **defect (exit 1)**,
527
+ no longer a `[!]` warning; `SKILL.md + always_load <= 9,000` stays a warning (it varies with project-side always_load,
528
+ so it is unsuitable as a hard gate). The error text says what to do: "sink details into references/ or README.md".
529
+ 3. Tests updated: the old "over budget only warns, exit 0" case became "**over the hard limit => exit 1**",
530
+ plus assertions that `--json` reports `budget.skill_md_limit == 3000` and `ok == false`.
531
+
532
+ **Honest limits**:
533
+ - Tokens are still **estimated** (CJK char ~1 token, otherwise 3.5 chars/token; since 1.2.1 the CJK ranges also
534
+ cover kana / hangul / emoji / extension-B, which previously could be used to dodge the limit). It has **not** been
535
+ compared against a real tokenizer (no tiktoken/transformers on this machine), so it is only comparable within itself;
536
+ the 3,000 line is defined in that estimator, so the headroom shifts with a real tokenizer.
537
+ - An agent that reads only `SKILL.md` no longer sees version history - a **deliberate** trade-off: history does not
538
+ drive execution, and README is reachable inside the same package (not a dead reference).
539
+ - The hard limit turns "I want to add one more paragraph to the entry" into exit 1; the mitigation is to put it in
540
+ `references/` and leave a one-line pointer. That is the design intent, not a bug.
541
+
542
+ ### 1.1.1 (2026-11-25: two must-fix items from the tier-A review, plus two untrue self-descriptions)
543
+
544
+ The 1.1.0 snapshot was handed to one independent reviewer under the **tier-A incremental review** and was **rejected** (4 must-fix items). All four are fixed here; **no scoring rule changed** - only the output contract and the prose:
545
+
546
+ 1. **`check_skill.py` gains `--allow-dirname-mismatch`** - "frontmatter `name` must equal the directory name" is a hard Agent Skills requirement, but it misfires whenever the package is copied elsewhere (e.g. a review bundle named `skill\`). It stays a **defect by default** (the shipped package must match); the flag downgrades it to a warning. **Why**: a reviewer running the baseline against a renamed copy got exit 1 with zero real defects.
547
+ 2. **`dept_gate.py --json` now emits pure JSON** - it used to print the `[anchor]` line, a separator and the human verdict as well, so only the last line parsed. **Why**: if a machine interface says "JSON only", it must be JSON only.
548
+ 3. **Duplicate top-level headings merged** in both READMEs (`## 变更记录` / `## Changelog` each appeared twice) - an artefact of inserting the 1.1.0 block.
549
+ 4. **Documented that the budget check only warns** - the 1.1.0 entry described the check but not that exceeding it still exits 0 (measured behaviour: warning + exit 0).
550
+
551
+ **Honest limits**: `--allow-dirname-mismatch` could be abused as a permanent "skip the name check" switch; mitigation is that it downgrades only that one item and leaves a visible `[!]` trail. The other four limits are as in 1.1.0.
552
+
553
+ ### 1.1.0 (2026-11-25: four mechanism gaps closed; machine self-check for "claims vs artefacts")
554
+
555
+ Based on a survey of comparable projects (DSH plugin market, Claude ecosystem, Agent Skills spec, and counter-evidence on multi-agent systems), only gaps that map to a **real incident** were closed. No new roles, no fourth log:
556
+
557
+ 1. **`scripts/check_skill.py` (new)** - seven static checks at that time (an eighth, manifest syntax,
558
+ came in 1.3.0): frontmatter (`name` must equal the directory name, `description` <= 1024), **version consistency across four places** (SKILL / manifest / README / README_EN), every asset declared in manifest/SKILL actually exists, entry documents must not mention non-distributed filenames (author-side verification record, fix-progress log, project board, delivery register), context budget (SKILL body <= 5000 tokens, SKILL + always_load <= 9000; **over-budget only warns, never blocks - exit stays 0**), `evals.json` readability, package completeness. **Why**: the same dead reference shipped twice, the version drifted three times, and one declared asset did not exist - all mechanical checks that human eyes miss.
559
+ 2. **Snapshot anchor** - `dept_gate.py` now prints an `[anchor]` line and accepts `--json`; the value is the first 12 hex chars of sha256 over the config plus the four ledgers. The review template gains a "snapshot anchor (recorded before and after the review)" field. **Why**: during round 5 a reviewer's package was edited mid-review; with an anchor that is caught on the spot.
560
+ 3. **`evals/` turned from dead data into runnable checks** - each case gains `assertions{must_include, must_exclude, axes, steps}`; `scripts/run_evals.py` provides `static` (schema + judge prompt), `grade` (deterministic assertion scoring) and `compare` (with-vs-without directories, with a small-N warning). **Why**: the author-side verification record admitted "7 static cases, no runner" - i.e. no eval at all.
561
+ 4. **Two new procedures** (project-side `_team\工作流.md` sections 4.13 / 4.14) - **pre-execution plan review** (when rigor=critical, planned machine time > 8 h, or the user asks; one read-only reviewer covers method, evidence/acceptance and downstream blast radius, then returns go / no-go / go-after-fixes, <= 3M tokens) and the **twice rule** (after two consecutive failures of the same approach, switch path and say why; never resend a third time).
562
+
563
+ **Deliberately not adopted** (rejected via the three optimisation questions): append-only event log, capability/bandit routing, 12-role pipeline, full panel for every task, "more homogeneous judges = more reliable".
564
+
565
+ **Honest limits**: token budget is an estimate (+-10-15% vs a real tokenizer); version detection takes the highest semver in each README (heuristic); keyword scoring cannot judge paraphrases and misfires when a forbidden phrase appears inside a negation; `compare` is directional (N=7, single grading), **not** an equivalence proof; an anchor proves files did not change, not that the change was right.
566
+
138
567
  ### 1.0.14 (2026-11-22, tests only, no runtime change)
139
568
  A **coverage hole** found after the freeze — by the author's own mutation testing, not by a reviewer:
140
569
 
@@ -1,8 +1,8 @@
1
- ---
1
+ ---
2
2
  name: project-dept
3
3
  description: 承包制智能体项目部——把一次复杂工作当成一个可验收的「板块」,串行推进;用开工闸门、三层验收 + 独立盲审、基准自审、方向复盘保证交付物可信。适用任何需要多人/多步协作且交付物要经得起检验的场合;用户说"按项目部开工 / 开一个板块 / 组团队做这块 / 检查要独立"时加载。
4
4
  metadata:
5
- version: 1.0.14
5
+ version: 1.3.8
6
6
  tags: [workflow, acceptance, blind-review, governance, provenance]
7
7
  ---
8
8
 
@@ -32,7 +32,7 @@ metadata:
32
32
  1. **读清单与核心层**:读 `manifest.yaml`,再读它 `always_load` 列的文件。不要先读 `references/`。
33
33
  2. **定轴值**:按 `manifest.yaml` 里每个轴的 `detect:` 提示判断本次的两个轴值,然后**用一行把检测结果告诉用户**,让他能低成本纠正——这是进度同步,不是审批闸门。
34
34
  3. **只加载命中的片段**:按轴值读 `static/fragments/` 里对应的文件。**不要读 `static/` 里所有片段**。
35
- 4. **按优先级套用**:core stance(`static/core/principles.md`)→ 交付物片段 → `static/core/workflow.md` 六步 → `static/core/output-contract.md` 输出契约。
35
+ 4. **按优先级套用**:core stance(`static/core/principles.md`)→ 交付物片段 → `static/core/workflow.md` 的 Step 0 闸门 + Step 1–6 → `static/core/output-contract.md` 输出契约。
36
36
  5. **按需取深参**:只有触发 `manifest.yaml` 里 `references.on_demand` 的条件时才读对应文件。
37
37
 
38
38
  **声明了却读不到的文件是缺陷,不是"跳过继续跑"的理由**:`manifest.yaml` / 本文件里声明要读的任何一个文件不存在,立刻停下、把缺失路径原样报给用户并记录,不许静默跳过、也不许凭记忆替它补内容。声明与实体不一致本身就说明这个包坏了(见 `references/anti-patterns.md`)。
@@ -62,22 +62,11 @@ metadata:
62
62
 
63
63
  脚本一律**相对自身位置解析**,不写死绝对路径。但注意:`find_config` 从**当前工作目录**向上找 `dept.config.json`,若在项目目录树之外运行可能找到错误项目的配置 —— 跑闸门前先确认 cwd 在本项目内,或显式传 `--config` / `--root`(R3-P4,如实声明而非假装无 cwd 依赖)。
64
64
 
65
- ## 变更记录
65
+ ## 变更记录在哪
66
66
 
67
- | 日期 | 版本 | 改了什么 |
68
- |---|---|---|
69
- | 2026-11-22 | v1.0.10 | 第九轮独立复审(逐条复跑 / 声明↔实体):行为层全真修,但仍判"一处改了别处没改 + 声明不全" ⇒ ①正文「悬空引用」规范段 ③④ 改为与实现一致的三种情形(全篇无注⇒FAIL / 只引别章⇒未执行并说明 / 既无注也无引用⇒未执行),修掉 1.0.9「已同步」的空头声明;②删掉不可达的「本章引本章号⇒FAIL」分支(已被二元组判定覆盖);③已知局限声明补全为"无分隔符 80 字 / 有分隔符 300 字"两档(此前只写 80,实测 168 字带空格的行文仍被当图注);④裸编号引用不再硬塞当前章(「图 9」不再被报成「图 3-9」),任一章有同号即满足;⑤动词+了 放宽到 1–8 字;新增 2 组单测 → unittest 46 |
70
- | 2026-11-22 | v1.0.11 | 修 1.0.10 引入的混键排序崩溃(`--chapter` 下裸编号+带章号引用且本章无图注 ⇒ TypeError 无结论行)、无章号图注被塞假章号;补 2 条单测(1 条混键崩溃回归 + 1 条无章号图注不得安上当前章;46→48);README_EN 退出码 2 补齐(与中文对齐);`README`/`README_EN` 的 ④ 改为与 ③ 并列的两条未执行路径、`SKILL` v1.0.9 行补两档修正注记 |
71
- | 2026-11-22 | v1.0.12 | 第十一轮复核判「通过但要修」后收尾:裸编号引用不再并入当前章(图 3-7 被引作「图 7」时不再出现「第 2 章 图 7」)、补 1 条对应单测并加强「无章号图注不得安上当前章」的断言(48→49);README_EN / SKILL 的 1.0.11 记录补齐 ④③ 并列与两档注记;exit 2 清单改为「主要几类(不限于)」 |
72
- | 2026-11-22 | v1.0.13 | 第十二轮复核判「不通过」后收尾(三条均为文字/测试强度):中文 README exit 2 清单改为「主要几类(不限于)」与英文对齐;新增单测补断言 `[7]` 并以变异副本自证有鉴别力;SKILL 1.0.11 行删掉属 1.0.12 的裸编号描述;README_EN「one documentation gap」→ two |
73
- | 2026-11-22 | v1.0.14 | 冻结后作者自测发现测试覆盖漏洞并补上(仅测试,不改运行时):第 10 轮混键排序修复原有用例的mixed keys 恰好都被满足、missing 为空集 ⇒ 回退修复 49 条单测仍全绿;补 `test_mixed_keys_missing_set_does_not_crash` 造 missing 非空且混键的用例,已用变异副本自证有鉴别力 |
74
- | 2026-11-22 | v1.0.9 | 第八轮独立复审(逐条复跑 / 声明↔实体)仍判不通过后修复:**跨章悬空改按 (章号, 编号) 二元组比较**(上一版把全篇编号拍平成集合,`--chapter 3` 引 图 9-9 被 图 2-9 的图注"满足",exit 0 假 PASS);「本章只引用别的章节的图」如实记未执行并说明,不再谎报"既没有图注也没有引用"(1.0.8 曾宣称已改准而实现未动,属空头声明);「动词 + 了」正则放宽到 1–6 字(漏了 详细描述了/进一步给出了);已知局限如实写下(无句末标点、≤80 字、非「X 了」形态的行文仍可能被当图注,1.0.8 的"长度上限兜住"是过头话已删;**其中「≤80 字」一句已被 v1.0.10 修正为「无分隔符 80 字 / 有分隔符 300 字」两档**);新增 3 组跨章/长动词单测 → unittest 44 |
75
- | 2026-11-22 | v1.0.8 | 第七轮独立复审(逐条复跑 / 声明↔实体)仍判不通过后修复:**行文标志改为「动词 + 了」正则**(`^(?:中)?[\u4e00-\u9fa5]{1,3}了`),不再穷举动词表——穷举"补一个漏一个"(收了「展示了」漏「显示了」,P2 实测「图 2-1 显示了…」+引用仍 exit 0);同时把 `所示 / 所示为 / 中给出 / 中列出` 从标志表移除——它们是**名词短语式图注**("图 2-1 中给出的开度分布"),当前缀会误杀真图注 exit 1(P1 实测);新增**跨章悬空引用**判定:正文引用了全篇都没有图注的编号(如 图 9-9)⇒ FAIL;新增 3 组回归单测(动词+了 判行文 / 四种名词短语图注不误杀 / 句末标点判行文)→ unittest 41;文档同步(README/README_EN/本行):词表口径、跨章悬空、"本章引用了别的章节的图"的说明;README_EN exit 3 补「顶层非对象」 |
76
- | 2026-11-22 | v1.0.7 | 第六轮独立复审(逐条复跑 / 声明↔实体 + 41 组反例)仍判不通过后修复:图注判据改为两条——整段以句末标点(。!?)结尾 ⇒ 判为行文而不是图注(中文图注体例不以句号收尾);紧接编号的动词标志词只收「了/所示」形态(**该描述已被 v1.0.8 修正:改为正则判「动词+了」,「所示/中给出的分布」不算标志**);悬空引用判定顺序改为**先全篇、后本章**(全篇一条图注都没有而正文引用图 ⇒ FAIL,此前 `--chapter 3` 时会被记成未执行放过);文案纠正:`dept_gate` 不读 `banned_terms`,该字段类型校验只在 `check_doc`(字符串 ⇒ exit 2,此前 README/SKILL 称 gate exit 3 是空头支票);`workflow.md` 的 exit 3 去掉不存在的 "dependency missing",改为四种真实原因 |
77
- | 2026-11-22 | v1.0.6 | 第五轮独立复审(逐条复跑 / 声明↔实体 + 反例构造)仍判不通过后修复:图注识别不再"有分隔符就认"(正文段落「图 2-1 所示的…」曾被当成图注使 A4 假 PASS),改为「紧接编号的行文标志词 ⇒ 不是图注」+ 分隔符分支限长 300 字(无分隔符仍在 80 字)、分隔符必须是真空白/制表符/全角空格/冒号(原先写字面转义导致制表符分隔的长图注假 FAIL);兜底 FAIL 的 `\s*` 改为行内空白(不再把"如图"+换行+"3 号点"拼成图号);`--chapter N` 下"本章引用了图却无任何图注"判 FAIL(悬空引用)而非未执行;`dept_gate` 围栏识别支持 `~~~`;有确定 FAIL 时优先报 FAIL 而不是「未执行」;exit 3 文案补齐四种原因;新增图注识别单元测试 8 条 |
78
- | 2026-11-22 | v1.0.5 | 第四轮独立复审(逐条复跑 / 声明↔实体 + 反例构造)仍判不通过后修复:图注允许「编号后直接接题名」(段落开头 + ≤80 字);兜底 FAIL 认括号编号 `图(2-1)` 使「识别不了编号⇒FAIL」的声明成立;`check_doc` 新增祖先配置判定(本地有台账而配置只在祖先 ⇒ exit 2);`dept_gate` 显式 `--config` 真的放行(escape hatch 与提示一致);扫描前清空 ``` 围栏内容(示例片段不再伪造小节/债务);参考文献小节认 `参 考 文 献` / 带冒号写法;退出码归属按脚本写清;`tests` 的 `__main__` 移到末尾;`evals` 第 6 条 prompt 补 critical 前提 |
79
- | 2026-11-22 | v1.0.4 | 第三轮独立复审(机械复跑 / 反例与一致性对抗)仍判不通过后修复:债务 bullet 三种标记(`-`/`*`/`+`)都认且明写「勾选框=自报、闸门不核证据」;本目录有台账但配置只在祖先找到 ⇒ exit 3(不许拿祖先台账审本项目);配置类型校验(`dept_gate` 只校验配置顶层是 JSON 对象 ⇒ exit 3,它不读 `banned_terms`;`banned_terms` 为字符串由 `check_doc` ⇒ exit 2);编号正则改行内空白(不再把跨行「图」+「3」拼成假编号);`--chapter` 下「本章无图」不再被兜底判 FAIL;冒号式图注与「参考文献」后的致谢/附录正确处理;作者-年份制如实标注「反方向未机械核对」;`self-skepticism.md` 准入问 2 增「用户明确要求」例外条款;README_EN 补回 1.0.3/1.0.4 并同步退出码 |
80
- | 2026-11-22 | v1.0.3 | 第二轮独立复审(机械判据 / 一致性对抗两路)判不通过后修复:check_doc 支持「章-号」与「全局编号」两种制式且混用判 FAIL、识别不了编号时不再当未执行放行、A4/A5 按章分组不再跨章抵消;坏 `--config`/坏 JSON ⇒ exit 2,新增 `--root`;dept_gate 找不到债务小节 ⇒ exit 1、小节标题大小写不敏感(英文 `Open debts` 以前漏查)、多个同名小节全扫、零告警不再印「有告警」;文案如实(`code.md` cwd、SKILL 死引用、manifest 首行、evals rigor 依据、两处退出码归属) |
81
- | 2026-11-22 | v1.0.2 | L2 三复核人 panel 盲审判不通过后逐条修复 F1–F10:critical 基准回核口径统一为 all;check_doc 未执行不再算通过(缺配置 exit 2、无 --chapter 时 A3 不执行、A1–A7 执行 <3 条 exit 2、裸章号跳号能报);dept_gate 债务只认「- [ ]」(豁免行不再永判未处置)、台账文案与实查一致、project_name 与目录不符告警;cwd 依赖如实声明;panel 隔离靠构造;README 死引用清除;tests/evals 去项目专名;manifest 退出码归属 + 缺失资产策略。回归记录在作者会话本地(**不随包分发**),包内可复跑的复现命令见 README 与 evals |
82
- | 2026-11-21 | v1.0.1 | 新增多复核人(panel review)机制:触发条件(将当基准 / 此前漏检 / 用户要求 / Lead 三处弱点无法缓解)、异方法锚点组成、魔鬼代言人、互不可见、判定规则(任一真问题即阻断;全票 PASS 仍须 L3 探查)。见 `references/blind-review.md` § Panel review |
83
- | 2026-11-21 | v1.0.0 | 从项目内 `thesis-dept` 升级为通用 skill:拆成 主文件路由 + `manifest.yaml` 声明 + `static/core` + 片段 + 按需 `references` + 参数化脚本 + evals;新增「何时不加载」「边界」两节;把项目路径与专有名词全部外置到项目侧配置 |
67
+ 变更记录:中文在 `README.md` § 变更记录,英文在 `README_EN.md` § Changelog(每种语言各一处;同一语言内**不写第二份**——
68
+ 第二份副本必腐化,这是我们 anti-pattern 清单里的一条)。
69
+ 本文件**不重复**历史,入口只保留当前版本号(frontmatter `metadata.version`)。
70
+
71
+ 改本文件时:**不要**把变更明细写回来;明细写进 README,并让 `scripts/check_skill.py` 的预算断言过关
72
+ (SKILL.md 硬上限 3000 tokens,超了就直接 exit 1)。